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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 3 04:44:22 PST 2013


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


David Eagen <david at eagen.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david at eagen.com


--- Comment #1 from David Eagen <david at eagen.com> 2013-01-03 04:44:21 PST ---
This is probably related to issue 7069. 

The problem also occurs on structs like this:

import std.concurrency, std.exception, std.stdio;

struct Combined
{
  string str1;
  string str2;
  bool status;
}

void main() {
   auto tid = spawn(&worker);
   Combined c = Combined("one", "two", false);
   tid.send(c);
}

void worker() {
  for (bool running = true; running; ) 
  {
    receive(
        (Combined c) 
        { 
          writeln("Got ", c.str1, "\t", c.str2, "\t", c.status);
        },

    (OwnerTerminated unused)
    {
      running = false;
    }    
    );
  }
}

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