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: nob...@puremagic.com
        ReportedBy: lomerei...@gmail.com


--- Comment #0 from Artem Tarasov <lomerei...@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: -------

Reply via email to