Abort all fibers along a call chain when one aborts.

This commit is contained in:
Bob Nystrom
2017-10-06 07:39:00 -07:00
parent 0f19984017
commit 8963a870ff
3 changed files with 71 additions and 50 deletions
-31
View File
@@ -8,34 +8,3 @@ System.print(fiber.try())
// expect: before
// expect: Bool does not implement 'unknownMethod'.
System.print("after try") // expect: after try
var fiber2 = Fiber.new {
var fiberInner = Fiber.new {
System.print("before")
true.unknownMethod
System.print("after")
}
fiberInner.call()
}
System.print(fiber2.try())
// expect: before
// expect: Bool does not implement 'unknownMethod'.
System.print("after try") // expect: after try
var fiber3 = Fiber.new {
var fiberInner = Fiber.new {
var fiberInnerInner = Fiber.new {
System.print("before")
true.unknownMethod
System.print("after")
}
fiberInnerInner.call()
}
fiberInner.call()
}
System.print(fiber3.try())
// expect: before
// expect: Bool does not implement 'unknownMethod'.
System.print("after try") // expect: after try