Example CondVar code should explicitly drop the MutexGuard after it's done with it #67457
Labels
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
At the very end of
rust/src/libstd/sync/condvar.rs
Lines 89 to 110 in 6b561b4
std::mem::drop(started)
call. Leaving a condition variable's mutex held after we're no longer watching it will block and possibly deadlock notifier threads.The text was updated successfully, but these errors were encountered: