https://issues.dlang.org/show_bug.cgi?id=17543

--- Comment #3 from Robert Luger <weltenst...@gmail.com> ---
This works though:


import std.stdio, std.parallelism;


__gshared:


auto return_gshared(){

    class Test {
        bool set;
    }

    return new Test();

}


void main(){
    auto obj = return_gshared();
    auto t = { obj.set = true; }.task;
    t.executeInNewThread;
    t.spinForce;
    writeln(obj.set);
}

--

Reply via email to