Implement trap
#17
Labels
api
Relates to the API design
core
Describes core required functionality
enhancement
An improvement to existing functionality
With structured concurrency, a child thread may throw an exception which, by default, will terminate execution of the thread, but will be lost. A method should be provided to ensure that exceptions are never "lost" in this way.
Whatever method is used for defining the exception handling, it should be hierarchical, and conform to the concurrent structure. In particular, stack safety should be maintained. It should not be possible to smuggle a resource outside of its bounded stack using an exception. If an exception is not handled in one thread then it should be handled by that thread's parent.
At the top level, a
Supervisor
must handle the exception one way or another, but this should be determined by a contextual value.The text was updated successfully, but these errors were encountered: