Call thread_attachThis() from your D shared library

Ali Çehreli acehreli at yahoo.com
Sat Nov 18 22:06:17 UTC 2017


On 11/18/2017 03:45 AM, Guillaume Piolat wrote:

 > I highly advise to attach incoming threads _and detach them when they
 > exit the callback_. Indeed when they have exited the callback no need to
 > scan their stack.
 >
 > If you don't do this and the thread dies outside your library, then your
 > runtime still register it and will try to pause it at the first 
collection.

Ooh! That makes sense. :)

Ali



More information about the Digitalmars-d-learn mailing list