[Issue 11309] std.concurrency: OwnerTerminated message doesn't work
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Tue Oct 22 16:31:30 PDT 2013
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=11309
--- Comment #3 from Martin Krejcirik <mk at krej.cz> 2013-10-23 01:31:28 CEST ---
If it's any help, try adding the folowing terminate() function and call it at
the end of main(). The thread will end correctly (but the main segfaults). I
was using it like this in 2.063 and it worked. I guess something has changed in
druntime.
extern (C)
{
    // These are for control of termination
    void rt_moduleTlsDtor();
    void thread_joinAll();
    void rt_moduleDtor();
    void gc_term();
    void _STD_critical_term();
    void _STD_monitor_staticdtor();
} /* end extern C */
void terminate()
{
    // Phobos termination (since we can't really make main() return):
    rt_moduleTlsDtor();
    thread_joinAll();
    rt_moduleDtor();
    gc_term();
    version (Posix)
    {
        _STD_critical_term();
        _STD_monitor_staticdtor();
    }
    exit(EXIT_SUCCESS);
}
-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
    
    
More information about the Digitalmars-d-bugs
mailing list