Fiber cross threads terminated
    mogu via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Thu Sep  1 18:27:35 PDT 2016
    
    
  
Here's my code in main function:
```
     auto fiber = new Fiber({
         while (true) {
             Thread.sleep(1.seconds);
             Fiber.yield;
         }
     });
     void foo() {
         while (true) {
             fiber.call;
             //Thread.sleep(1.seconds);
             //"---".writeln;
         }
     }
     new Thread({
         foo();
     }).start;
     new Thread({
         Thread.sleep(500.msecs);
         foo();
     }).start;
```
If I comment the `fiber.call;`, all works.
system: ubuntu 16.04LTS
dmd version: 2.071.1
    
    
More information about the Digitalmars-d-learn
mailing list