Necessary Maintenance #15676
art - Milestone #15372: art multi-threading phase 1
- Under C++11, destructors are implicitly declared noexcept. See https://akrzemi1.wordpress.com/2011/09/21/destructors-that-throw/ for more details. Sentries need to take account of this and deal with the problem sensibly and consistently.
This is especially important for the signal sentries due to the fact that e.g., if a module's main entry point throws, then the signals invoked will be invoked while the stack is being unwound as a consequence.
Possible solutions include:
- Catching and swallowing any exception.
- Catching and saving the exception outside the sentry in an object provided by reference, and dealing with it when the original exception is caught.
- Other magic with e.g.
#7 Updated by Kyle Knoepfel over 2 years ago
Another option is that the signal sentry classes could be removed. Yes, this would be a change in behavior, but it would be consistent with some recent changes in the signal invocations as committed in (e.g.) art:dcc26cf. The interpretation for the
post* signals would be that they would be called whenever a module call did not result in an exception throw.
Note that I am not suggesting we remove all of the sentries in
art, thus abandoning the RAII idiom, but it may be appropriate for this particular use case. The question is would the experiments approve of the change in behavior?
#9 Updated by Kyle Knoepfel over 2 years ago
- Status changed from Accepted to Resolved
- Assignee set to Kyle Knoepfel
- Target version set to 1209
- % Done changed from 0 to 100
A proposal has been made to the users and stakeholders to remove the signal sentries. Commit art:b3caa7c implemented their removal, in anticipation of the users' acceptance of the proposal.