[Issue 2439] static ~this() cannot be used to shutdown threads

Sönke Ludwig ludwig_no at spam_informatik.uni-luebeck.de
Mon Nov 3 03:44:17 PST 2008


d-bugmail at puremagic.com schrieb:
> http://d.puremagic.com/issues/show_bug.cgi?id=2439
> 
> 
> sean at invisibleduck.org changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|NEW                         |RESOLVED
>          Resolution|                            |WONTFIX
> 
> 
> 
> 
> ------- Comment #1 from sean at invisibleduck.org  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.


More information about the Digitalmars-d-bugs mailing list