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
In the thread, the mutex is locked before waiting and then setting the condition, so wait_timeout waits until the condition is set (try changing that 20 ms to 1000 ms for dramatic effect). The sleep should be before the lock and notify.
The text was updated successfully, but these errors were encountered:
gsollazzo
added
the
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
label
Feb 15, 2018
This example does not exhibit the desired behaviour:
https://doc.rust-lang.org/beta/std/sync/struct.WaitTimeoutResult.html
In the thread, the mutex is locked before waiting and then setting the condition, so
wait_timeout
waits until the condition is set (try changing that 20 ms to 1000 ms for dramatic effect). Thesleep
should be before the lock and notify.The text was updated successfully, but these errors were encountered: