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/[email protected]?

Andrei

class BazingaException : Exception {

    RefCount!Stuff reallyImportantStuff;

    // ...

}

void main() {
    auto t = new Thread({
        RefCount!Stuff s = ...;
        throw new BazingaException(s);
    });

    t.start();
    t.join();
}

Reply via email to