By design, there can be thread switches in Coroutine.cancel() method.
However, this caused non-determinism due to not resetting TestThread.cont and, as a result, sometimes calling TestThread.cont.cancel() when there is no cancellable coroutine, adding odd switch points.
By design, there can be thread switches in
Coroutine.cancel()
method. However, this caused non-determinism due to not resettingTestThread.cont
and, as a result, sometimes callingTestThread.cont.cancel()
when there is no cancellable coroutine, adding odd switch points.