You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was running parking_lot's tests with (a futex-aware version of) Miri, and ran into two minor unit test 'bugs' that are not really bugs. I figured it might be good to have a quick look at them anyway:
test_condvar_requeue gets stuck on a single-core system with a non-preemptive scheduler, such as Miri, because the spawned thread never gets the chance to do anything. I'm assuming this is not really a normal use case for parking_lot, but adding a simple std::thread::yield_now() in the loop fixes this.
test_rwlock_recursive leaks a thread: it spawns a thread that's blocked forever and outlives the main thread. That's not really a problem, because exiting the main thread exits the whole process, but simply dropping the locks and joining the thread at the end of the test would fix this leak.
I'm guessing both are probably fine and working as intended, so feel free to just close this issue. :) If you think it's worth 'fixing' these, let me know and I'll send a PR.
The text was updated successfully, but these errors were encountered:
I was running
parking_lot
's tests with (a futex-aware version of) Miri, and ran into two minor unit test 'bugs' that are not really bugs. I figured it might be good to have a quick look at them anyway:test_condvar_requeue
gets stuck on a single-core system with a non-preemptive scheduler, such as Miri, because the spawned thread never gets the chance to do anything. I'm assuming this is not really a normal use case forparking_lot
, but adding a simplestd::thread::yield_now()
in the loop fixes this.test_rwlock_recursive
leaks a thread: it spawns a thread that's blocked forever and outlives the main thread. That's not really a problem, because exiting the main thread exits the whole process, but simply dropping the locks and joining the thread at the end of the test would fix this leak.I'm guessing both are probably fine and working as intended, so feel free to just close this issue. :) If you think it's worth 'fixing' these, let me know and I'll send a PR.
The text was updated successfully, but these errors were encountered: