A Refcounted Array Type

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 26 13:07:26 PST 2015


On 2/26/15 12:54 PM, deadalnix wrote:
> On Thursday, 26 February 2015 at 16:57:51 UTC, Andrei Alexandrescu wrote:
>> On 2/26/15 8:51 AM, Steven Schveighoffer wrote:
>>> As talked about before, running dtors in the originating thread can
>>> solve this problem.
>>
>> Yah, that will solve the nonatomic reference counting. What do you
>> think about http://forum.dlang.org/thread/mcllre$1abs$1@digitalmars.com?
>>
>> Andrei
>
> class BazingaException : Exception {
>
>      RefCount!Stuff reallyImportantStuff;
>
>      // ...
>
> }
>
> void main() {
>      auto t = new Thread({
>          RefCount!Stuff s = ...;
>          throw new BazingaException(s);
>      });
>
>      t.start();
>      t.join();
> }

Could you please walk me through what the matter is here. Thanks. -- Andrei



More information about the Digitalmars-d mailing list