Re: std.concurrency and module constructors

2012-05-11 Thread sclytrack
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. :-)

Re: std.concurrency and module constructors

2012-05-11 Thread japplegame
Thank you. Solution is: shared static this() { ... } or avoid any global things :)

Re: std.concurrency and module constructors

2012-05-11 Thread Simen Kjaeraas
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

std.concurrency and module constructors

2012-05-11 Thread japplegame
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