www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Sending immutable classes using std.concurrency

reply "Martin" <martinbbjerregaard gmail.com> writes:
Can someone tell me what's wrong with this code?
http://dpaste.dzfl.pl/9ff4271f866c

I'm trying to send an immutable instance of a class to another 
thread using the send and receive functions in std.concurrency.
I've already searched and found someone talking about std.variant 
being bugged. Has this still not been fixed, or is my code wrong?
Mar 08 2014
parent reply "Dicebot" <public dicebot.lv> writes:
On Saturday, 8 March 2014 at 16:36:56 UTC, Martin wrote:
 Can someone tell me what's wrong with this code?
 http://dpaste.dzfl.pl/9ff4271f866c

 I'm trying to send an immutable instance of a class to another 
 thread using the send and receive functions in std.concurrency.
 I've already searched and found someone talking about 
 std.variant being bugged. Has this still not been fixed, or is 
 my code wrong?
I think this should be in next release: https://d.puremagic.com/issues/show_bug.cgi?id=7069
Mar 08 2014
parent "Martin" <martinbbjerregaard gmail.com> writes:
On Saturday, 8 March 2014 at 17:53:03 UTC, Dicebot wrote:
 On Saturday, 8 March 2014 at 16:36:56 UTC, Martin wrote:
 Can someone tell me what's wrong with this code?
 http://dpaste.dzfl.pl/9ff4271f866c

 I'm trying to send an immutable instance of a class to another 
 thread using the send and receive functions in std.concurrency.
 I've already searched and found someone talking about 
 std.variant being bugged. Has this still not been fixed, or is 
 my code wrong?
I think this should be in next release: https://d.puremagic.com/issues/show_bug.cgi?id=7069
Sweet! Thanks, can't wait. This is a bug from 2011 though, and it's almost a showstopper when using std.concurrency, how come this has not been fixed earlier?
Mar 08 2014