Summary: static ~this() cannot be used to shutdown threads
           Product: D
           Version: 2.020
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]

In src/druntime/src/compiler/dmd/dmain2.d:301 thread_joinAll() is called before
_moduleDtor(). This makes it impossible to perform thread shutdown inside of a
module destructor because the thread_joinAll() call will wait indefinitely if
there are still threads waiting for a shutdown signal.

Moving thread_joinAll between _moduleDtor() and gc_term() should fix the issue.

(not sure if this should go here or into the trac issue tracker for


Reply via email to