A Refcounted Array Type
deadalnix via Digitalmars-d
digitalmars-d at puremagic.com
Thu Feb 26 12:54:14 PST 2015
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();
}
More information about the Digitalmars-d
mailing list