Add fiber features needed for to write an external scheduler:
- Allow yielding the main fiber. This exits the interpreter. The host can resume it by calling a method. - Allow getting a reference to the current fiber.
This commit is contained in:
@@ -1 +1,3 @@
|
||||
Fiber.yield() // expect runtime error: No fiber to yield to.
|
||||
IO.print("before") // expect: before
|
||||
Fiber.yield()
|
||||
IO.print("not reached")
|
||||
|
||||
Reference in New Issue
Block a user