On Monday, 14 September 2015 at 08:08:35 UTC, Ali Çehreli wrote:
void main()
{
    MultiThreadedUnique!S u1 = produce();
    auto childTid2 = spawn(&spawnedFunc2, thisTid);

    u1.giveTo(childTid2);
    send(childTid2, cast(shared(MultiThreadedUnique!S*))&u1);

    import core.thread;
    thread_joinAll();

    writeln("Successfully printed number.");
    auto u2 = &u1.get();
}

Ali

ok... I tried the code. It works well in the first approach... But I have to think about it some more time... Thanks again!

Reply via email to