[Gc] FYI for GC users on multi-threaded apps

Tracy Brown tbrown at perfnet.com
Tue Jun 8 12:55:09 PDT 2010


I've been debugging a daemon where I had implemented GC and discovered (though obvious now that I know) that you cannot use GC in a multi-threaded environment where you dispatch to another thread and that other thread returns a result that is allocated dynamically. There may be application specific reasons as to why this is the case for me but the short answer is that GC uses thread specific memory that isn't accessible to another thread. If there's any vestige of truth to this, maybe someone can elaborate and make a note in the usage docs. As for me, I altered my dispatching architecture to retain GC. Hope this helps someone somewhere avoid a little grief.

Cheers,

Tracy Steven Brown



More information about the Gc mailing list