[Issue 8853] Unable to use std.concurrency.receive with Tuple!(immutable(int[]))

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 21 10:01:25 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=8853


Stephan <stephan.schiffels at mac.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stephan.schiffels at mac.com


--- Comment #1 from Stephan <stephan.schiffels at mac.com> 2013-01-21 10:01:24 PST ---
I would like to add my own program to this issue, which also hangs, most likely
due to the same reason. If you remove ANY of the three members of the struct
(and edit the message accordingly), the program passes normally. Only with all
three struct members, it hangs:

import std.stdio;
import std.concurrency;

struct message_t {
  string str;
  int num;
  immutable(int)[] vec;
}

void func(Tid caller) {
  auto msg = message_t("foo", 42, [1, 2, 3]);
  caller.send(msg);
} 

void main() {
  spawn(&func, thisTid);
  auto msg = receiveOnly!(message_t);
  writeln("received: ", msg);
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list