A Refcounted Array Type

via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 26 13:40:19 PST 2015


On Thursday, 26 February 2015 at 18:08:28 UTC, Steven 
Schveighoffer wrote:
> On 2/26/15 12:56 PM, "Marc =?UTF-8?B?U2Now7x0eiI=?= 
> <schuetzm at gmx.net>" wrote:
>> On Thursday, 26 February 2015 at 16:51:30 UTC, Steven 
>> Schveighoffer wrote:
>>> As talked about before, running dtors in the originating 
>>> thread can
>>> solve this problem.
>>
>> This probably implies forcibly destroying objects whose 
>> creating thread
>> terminated.
>
> I don't think so, those objects can just be destroyed by the 
> GC-collection running thread. If the thread is no longer 
> present, there can't be a race.

That's true. However, what if the destructors access global 
(thread-local) variables? Is that already disallowed?


More information about the Digitalmars-d mailing list