Escaping the Tyranny of the GC: std.rcstring, first blood

Dmitry Olshansky via Digitalmars-d digitalmars-d at puremagic.com
Sun Sep 21 01:24:44 PDT 2014


20-Sep-2014 21:55, "Ola Fosheim Grøstad" 
<ola.fosheim.grostad+dlang at gmail.com>" пишет:
> On Saturday, 20 September 2014 at 15:30:55 UTC, Andrei Alexandrescu wrote:
>> I understand. RC strings will work just fine. Compared to interlocked
>> approaches we're looking at a 5x improvement in RC speed for the most
>> part because we can dispense with most interlocking. -- Andrei
>
> Can someone explain why?
>
> Since fibers can travel between threads, they will also be able to leak
> objects to different threads.

Not spontaneously :)
You'd have to cast to shared and back, and then you are on your own.
Fiber is thread-local, shared(Fiber) isn't.

-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list