On 05/11/2012 03:44 PM, japplegame wrote:
Thank you.
Solution is:
shared static this() {
...
}
or avoid any global things :)
And I learned something new today. :-)
Thank you.
Solution is:
shared static this() {
...
}
or avoid any global things :)
On Fri, 11 May 2012 14:56:03 +0200, japplegame
wrote:
OS: Windows 7 64bit
Compiler: DMD32 D Compiler v2.059
Using spawn in module constructor causes very strange behavior.
import std.concurrency;
import std.stdio;
void main() {
}
void worker() {
receiveOnly!OwnerTerminated;
}
static this
OS: Windows 7 64bit
Compiler: DMD32 D Compiler v2.059
Using spawn in module constructor causes very strange behavior.
import std.concurrency;
import std.stdio;
void main() {
}
void worker() {
receiveOnly!OwnerTerminated;
}
static this() {
writeln("module constructor");
spawn(&worker);
}
st