This function throws an exception in another fiber. The fiber will be scheduled to run.
There is a difference in semantics between the two forms. The first form throws an identical copy of the exception in the
target fiber. The second form forms a new exception to be thrown in that fiber.
One place where this difference matters is with the stack trace the thrown exception will have. With the first form, the
stack trace will be the stack trace ex has, wherever it is (usually not in the fiber in which the exception was thrown).
With the second form, the stack trace will be of the target fiber, which means it will point back to where the fiber went
to sleep.
forward an exception to another fiber
This function throws an exception in another fiber. The fiber will be scheduled to run.
There is a difference in semantics between the two forms. The first form throws an identical copy of the exception in the target fiber. The second form forms a new exception to be thrown in that fiber.
One place where this difference matters is with the stack trace the thrown exception will have. With the first form, the stack trace will be the stack trace ex has, wherever it is (usually not in the fiber in which the exception was thrown). With the second form, the stack trace will be of the target fiber, which means it will point back to where the fiber went to sleep.