DIP80: phobos additions

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 11 10:34:30 PDT 2015


On 6/11/15 5:17 AM, Steven Schveighoffer wrote:
> On 6/11/15 4:15 AM, "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm at gmx.net>"
> wrote:
>> On Wednesday, 10 June 2015 at 20:31:52 UTC, Steven Schveighoffer wrote:
>>> OK, thanks for the explanation. I'd do it the other way around:
>>> Flag!"threadlocal", since we should be safe by default.
>>
>> `RefCounted!T` is also thread-local by default, only
>> `shared(RefCounted!T)` needs to use atomic operations.
>
> I may have misunderstood Andrei. We can't just use a flag to fix this
> problem, all allocations are in danger of races (even thread-local
> ones). But maybe he meant *after* we fix the GC we could add a flag? I'm
> not sure.

Yes, we definitely need to fix the GC. -- Andrei


More information about the Digitalmars-d mailing list