WinAPI callbacks and GC

Sean Kelly sean at invisibleduck.org
Tue Apr 30 17:12:39 PDT 2013


On Apr 23, 2013, at 2:21 PM, Jack Applegame <japplegame at gmail.com> wrote:
> 
> According WinAPI documentation, CtrlHandler will be called in new additional thread. Is it safe to allocate GC memory in NOT Phobos threads?
> If not, how to make it safe? I'm trying call thread_attachThis() at the beginning of CtrlHandler fucntion, but it doesn't compile because thread_attachThis() is not no throw.


thread_attachThis should probably just be labeled nothrow.  I don't think there's anything in that function that can throw an Exception.


More information about the Digitalmars-d-learn mailing list