I didn't tested this, but I just realized, that a foreign thread added through thread_attachThis has currently no way of knowing which DSOs it needs to initialize. So it'll likely end up not calling any thread ctors (static this();) at all.
Comment #1 by code — 2013-09-08T23:23:14Z
I thought about this and I think inheriting the loaded libraries of the main thread would be a sane behavior.
The main thread is the one that runs D main or the one that dlopened druntime.
Comment #2 by robert.schadek — 2024-12-07T13:32:55Z