The GC and performance, but not what you expect

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Thu May 29 12:13:50 PDT 2014


On Thu, 29 May 2014 14:42:19 -0400, Ali Çehreli <acehreli at yahoo.com> wrote:

> On 05/29/2014 06:06 AM, Steven Schveighoffer wrote:
>
>  > The explanation in the comment is that finalizers may spawn a new
>  > thread. See
>  >  
> https://github.com/D-Programming-Language/druntime/blob/master/src/gc/gc.d#L410  
> The strange thing is, finalizers may not even be executed.

They should be executed if the memory is collected.

> :-/ I would simply change the spec saying "finalizers may not start a  
> new thread."

Probably a good idea :)

> Getting back to Atila's issue, I would simply comment-out that lock in  
> druntime, beat Java, and then put the lock back in. :o)

Probably the sanest option, but then you can't really say that D beats  
Java :)

-Steve


More information about the Digitalmars-d mailing list