A Refcounted Array Type

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 26 10:10:23 PST 2015


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.

However, this has to be done carefully. For instance, you have to run 
dtors on next allocation, or when thread terminates, because if you do 
it inside stop-the-world signal handler, you still potentially have a race.

-Steve


More information about the Digitalmars-d mailing list