mirror of
https://review.haiku-os.org/haiku
synced 2025-01-31 02:35:03 +01:00
25556bf64a
There was no synchronization of the check of the done flag and the waiting thread suspending to wait for it. It was therefore possible that the new team both set the flag and triggered the wakeup of the waiting thread in that time window, causing it to miss both the set flag and the thread resumption. Use a condition variable instead. Fixes #13081. Change-Id: I93c45db8dd773fe42b45c4b67153bcd39e200d3b Reviewed-on: https://review.haiku-os.org/803 Reviewed-by: waddlesplash <waddlesplash@gmail.com> (cherry picked from commit 919185caba99aa0110c589d3661d0c4a0f0b2fae) Reviewed-on: https://review.haiku-os.org/804