МВ
Size: a a a
МВ
И
EP
И
Тᅠ
Error: static assert: "Aliases to mutable thread-local data not allowed."
instantiated from here: spawn!(void function(MySocket), MySocket)
МВ
МВ
Тᅠ
Тᅠ
Тᅠ
Тᅠ
МВ
МВ
МВ
МВ
Тᅠ
МВ
import std.concurrency : receiveOnly, send,
spawn, Tid, thisTid;
import core.atomic : atomicOp, atomicLoad;
import std.stdio: writeln;
struct Data {
string t;
}
void thread_func(Data d) {
d.t.writeln;
}
void main()
{
Data d;
d.t = "my_str";
auto consumer = spawn(&thread_func, d);
}
Тᅠ