Share array element between threads
    Misu via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Thu Nov  6 05:13:08 PST 2014
    
    
  
On Thursday, 6 November 2014 at 13:04:18 UTC, Marc Schütz wrote:
> It's a bug: https://issues.dlang.org/show_bug.cgi?id=2043
>
> As a workaround, you can nest the call in another lambda:
>
>     foreach(acc; accounts)
>     {
>         (Account acc) {
>             task(() { writeln(acc.id); }).executeInNewThread();
>         } (acc);
>     }
Ok that's good. thank you !
    
    
More information about the Digitalmars-d-learn
mailing list