Heisenbug involving Destructors & GC - Help Needed

Etienne via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 27 06:28:15 PDT 2015


On Saturday, 27 June 2015 at 12:28:26 UTC, Kagamin wrote:
> On Friday, 26 June 2015 at 18:27:34 UTC, Maxime 
> Chevalier-Boisvert wrote:
>> I seem to have run into a heisenbug involving destructors and 
>> the GC. I'm kind of stuck at this point and need help tracking 
>> down the issue.
>
> BTW, how GC performance is doing? Etienne is experimenting with 
> thread local GC: 
> http://forum.dlang.org/post/nfuzudyoatryapcwxquu@forum.dlang.org which also proved to be faster. But only if single-threaded GC is good enough for you, which normally should be given single-threaded model of javascript.

The new keyword can leverage the shared keyword to place certain 
objects in a shared GC, which can coexist with the local GC 
without fundamental changes. ie std.concurrency already requires 
that you pass shared objects, but casting won't cut it anymore 
you'll actually have to duplicate the object on the shared GC 
with .sdup or create it there with new shared. I don't need a 
shared GC right now so I'm not pushing too much for it, I'm 
satisfied with keeping a pointer of the object alive in the 
thread it was created and that's all a thread local GC really 
requires for concurrency to work


More information about the Digitalmars-d mailing list