xxxxxxxxxx
import core.thread;
import std.stdio;
class SuperUsefulThing
{
private int _value;
this() { _value = 0; }
int read() { return _value; }
void write(int value) { _value = value; }
}
void main()
{
auto myNotSharedObject = new SuperUsefulThing();
myNotSharedObject.write(7);
auto ot = new Thread({
myNotSharedObject.read();
myNotSharedObject.write(1234);
}).start();
ot.join();
writeln(myNotSharedObject.read());
}