lampepfl / gears

A strawman for a low-level async library in Scala 3.
https://lampepfl.github.io/gears/
Apache License 2.0
247 stars 24 forks source link

Fix flaky "race successful with wait" test #42

Closed natsukagami closed 6 months ago

natsukagami commented 6 months ago

This used to fail sometimes with the second source not getting rid of the listener. Occurs when the second listener call won the race, which is quite rare.

Due to the contract of the Source, it will remove the listener, but the second listener is called bare, so cleanup does not happen.