Is there any reason for this behavior?
```D
import std.stdio, core.thread.fiber;

Fiber one, two;

void main() {
        one = new Fiber(
                delegate() {
                        while(1) {
                                stderr.writefln("one says two.state = %s", 
two.state);
                                two.call();
                        }
                }
        );
        two = new Fiber(
                delegate() {
                        while(1) {
                                stderr.writefln("two says one.state = %s", 
one.state);
                                one.call();
                        }
                }
        );
        one.call();
}
```
Execution of one is suspended when it calls two, but then two reports the state of one is not HOLD.
```
one says two.state = HOLD
two says one.state = EXEC
one says two.state = EXEC
Segmentation fault
```
Is this a bug or a feature? If the last then why?

  • Using Fibers wit... Unthread via Digitalmars-d-learn

Reply via email to