[Issue 8853] New: Unable to use std.concurrency.receive with Tuple!(immutable(int[]))
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Oct 19 11:01:12 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8853
Summary: Unable to use std.concurrency.receive with
Tuple!(immutable(int[]))
Product: D
Version: D2
Platform: x86_64
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: lomereiter at gmail.com
--- Comment #0 from Artem Tarasov <lomereiter at gmail.com> 2012-10-19 11:01:09 PDT ---
The following code compiles, but the program hangs (because the message is not
received by foo()). Without wrapping array into struct everything works. If
immutable(int[]) is changed to immutable(int)[] -- also works.
import std.concurrency;
struct A {
immutable(int[]) a;
}
void foo(Tid tid) {
receive(
(A a) {
send(tid, true);
});
}
void main() {
Tid tid = spawn(&foo, thisTid);
immutable(int[]) a = [1];
send(tid, A(a));
receiveOnly!bool();
}
--
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