We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31bec78 commit 25db842Copy full SHA for 25db842
src/libstd/sys/unix/mutex.rs
@@ -27,8 +27,8 @@ impl Mutex {
27
pub const fn new() -> Mutex {
28
// Might be moved to a different address, so it is better to avoid
29
// initialization of potentially opaque OS data before it landed.
30
- // Be very careful using this newly constructed `Mutex`, it should
31
- // be initialized by calling `init()` first!
+ // Be very careful using this newly constructed `Mutex`, reentrant
+ // locking is undefined behavior until `init` is called!
32
Mutex { inner: UnsafeCell::new(libc::PTHREAD_MUTEX_INITIALIZER) }
33
}
34
#[inline]
0 commit comments