[Issue 2439] static ~this() cannot be used to shutdown threads
https://issues.dlang.org/show_bug.cgi?id=2439 Andrei Alexandrescu changed: What|Removed |Added Version|2.020 |D2 --
Re: [Issue 2439] static ~this() cannot be used to shutdown threads
[EMAIL PROTECTED] schrieb: http://d.puremagic.com/issues/show_bug.cgi?id=2439 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WONTFIX --- Comment #1 from [EMAIL PROTECTED] 2008-11-02 16:18 --- It's not unlikely that a thread may depend on static data, so by moving thread_joinAll() until after the module dtors are called we would be pulling the rug out from under these threads. Instead, I suggest making threads that interact with the module shutdown process into daemon threads by using the "isDaemon" property. These threads are ignored during thread_joinAll() and, left alone, will run until the process ends. Ah OK.. I didn't know about that property. That approach is definitly workable, albeit maybe a little non-obvious. THanks for the quick feedback.
[Issue 2439] static ~this() cannot be used to shutdown threads
http://d.puremagic.com/issues/show_bug.cgi?id=2439 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WONTFIX --- Comment #1 from [EMAIL PROTECTED] 2008-11-02 16:18 --- It's not unlikely that a thread may depend on static data, so by moving thread_joinAll() until after the module dtors are called we would be pulling the rug out from under these threads. Instead, I suggest making threads that interact with the module shutdown process into daemon threads by using the "isDaemon" property. These threads are ignored during thread_joinAll() and, left alone, will run until the process ends. --