Re: Call thread_attachThis() from your D shared library

2017-11-18 Thread Ali Çehreli via Digitalmars-d-learn
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 >

Re: Call thread_attachThis() from your D shared library

2017-11-18 Thread Guillaume Piolat via Digitalmars-d-learn
On Saturday, 18 November 2017 at 00:23:31 UTC, Ali Çehreli wrote: We had an issue today calling a D shared library from our Java code where we were getting segfaults during GC collection cycles. Of course we were being careful and calling Runtime.initialize() inside our initialization

Call thread_attachThis() from your D shared library

2017-11-17 Thread Ali Çehreli via Digitalmars-d-learn
We had an issue today calling a D shared library from our Java code where we were getting segfaults during GC collection cycles. Of course we were being careful and calling Runtime.initialize() inside our initialization function, which is called from the Java side: extern (C) auto