D-Programming-Language/druntime — pull request #589 by dawgfoto (2013-08-26 11:19:24+00:00)
Title: add explicit thread_term call to replace atexit

- When calling rt_init/rt_term from ELF's .ctors/.dtors section
atexit runs before rt_term, which causes a crash because the
thread locks are already destroyed.