Files
wren/test/fiber/yield_with_no_caller.wren
T

11 lines
286 B
Plaintext
Raw Normal View History

2014-04-14 07:23:05 -07:00
var a = new Fiber {
IO.print("before") // expect: before
Fiber.yield()
2014-04-14 07:23:05 -07:00
}
// Run a chain of fibers. Since none of them are called, they all get discarded
// and there is no remaining caller.
2015-02-26 23:08:36 -08:00
var b = new Fiber { a.run() }
var c = new Fiber { b.run() }
c.run()
IO.print("not reached")