Unsafe low-level mutex
Rust Internals
Unsafe low-level mutex
When using a Mutex<()> in low-level unsafe code, keeping around the guard in order to unlock can be tedious/suboptimal (and poisoning can be useless and thus suboptimal in panic-free code). It's unfortunate because std already embeds all the code for a low-level mutex (sys::Mutex), which could just be exposed as is. That's why I would like to add a std::sync::lowlevel::Mutex with the following API: pub struct Mutex { inner: sys::Mutex } impl Mutex { pub const fn new() -> Self { ...
0 comments
No comments yet.