[Issue 9122] New: std.concurrency send() fails with multiple arrays

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 7 06:04:28 PST 2012


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

           Summary: std.concurrency send() fails with multiple arrays
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: john.loughran.colvin at gmail.com


--- Comment #0 from John Colvin <john.loughran.colvin at gmail.com> 2012-12-07 06:04:25 PST ---
import std.concurrency;
import std.stdio;

void foo() {
    bool running  = true;
    while(running) {
         receive(
        (immutable(double)[] a, immutable(double)[] b, int i) {
        writeln(a, b, i);
        },
        (OwnerTerminated e) {
        running = false;
        }
    );
    }
}

void main() {
    double[] a,b;
    a = [1.1];
    b = [2.2];
    int i= 3;

    auto tid = spawn(&foo);

    tid.send(a.idup, b.idup, i); 
}

I get: core.exception.AssertError@ std/variant.d(277): target must be non-null

-- 
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