Closed
Description
std::sync::Mutex
is not reentrant (you can't .lock
a mutex if you already .lock
ed it and haven't released the lock), but this behavior is not documented.
Looks like the exact consequences of locking the mutex twice vary by platform. On linux, you get a deadlock. On windows there is a panic: https://github.com/rust-lang/rust/blob/master/src/libstd/sys/windows/mutex.rs#L75. Maybe this should panic
on all platforms?
Metadata
Metadata
Assignees
Labels
No labels