JetBrains / lincheck

Framework for testing concurrent data structures
Mozilla Public License 2.0
582 stars 34 forks source link

Fix non-determinism due to not resetting TestThread.cont #109

Closed alefedor closed 2 years ago

alefedor commented 3 years ago

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.