You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nothrow functions can skip critical cleanup code if Errors are thrown.
However, a thread aside from the main thread, which catches an Error, tries to forward the error onto the main thread. It also attempts to run all thread local static destructors.
This can cause problems if cleanup code that is skipped. For instance, a locked resource may remain locked. If the main thread is waiting on that resource before trying to join child threads, it may hang the entire process. If cleanup code is skipped, the entire process may be in an invalid state, and other threads should not be running.
The correct behavior should be for Errors to be caught in the thread start code, printed, and then the entire process should exit, just like the main thread does. If users want to handle the Error differently they should have to use a separate out of band mechanism.
The text was updated successfully, but these errors were encountered:
Steven Schveighoffer (@schveiguy) reported this on 2022-06-04T02:05:30Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=23156
Description
The text was updated successfully, but these errors were encountered: