static ctors in shared libs

Guillaume Piolat via Digitalmars-d digitalmars-d at puremagic.com
Sun Mar 27 16:35:25 PDT 2016


On Sunday, 27 March 2016 at 22:08:57 UTC, bitwise wrote:
>
> If TLS static ctors simply weren't run at all for dynamically 
> loaded libraries, there would be no confusion. Any D user that 
> tried to explore the use of shared libraries, would quickly 
> learn that TLS ctors are not called at all for dynamically 
> loaded libraries. I suppose then, that an API like 
> Runtime.AttachToThread() could be used to explicitly call the 
> TLS ctors.

That looks more sensible indeed.



More information about the Digitalmars-d mailing list