Go 1.5

Daniel Kozak via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sat Sep 19 15:00:48 PDT 2015



Dne 19.9.2015 v 21:30 Ola Fosheim Grøstad via Digitalmars-d-announce 
napsal(a):
> On Saturday, 19 September 2015 at 19:25:31 UTC, Ola Fosheim Grøstad 
> wrote:
>> On Saturday, 19 September 2015 at 19:17:38 UTC, Daniel Kozak wrote:
>>> No, collection could not occure if we speaking about current D GC
>>> implementation. So it safe to set pointer before addRoot.
>>
>> It can be triggered by another thread.
>>
>> Wrong:
>>
>> ptr = somestack.pop();
>> someglobalptr = ptr;
>> // ptr register flushed
>> // collection triggered by other thread
>> // other thread allocated the same memory for some other object
>> addRoot(ptr);
>
> Typo:
>
>> addRoot(someglobalptr);
>
Yes, now it seems possible :)


More information about the Digitalmars-d-announce mailing list