Compact and efficient synchronization primitives for Rust. Also provides an API for creating custom synchronization primitives.
2.76k
stars
217
forks
source link
Add `lock_api::{Mutex, ReentrantMutex, RwLock}::from_raw` methods #426
Closed
nspin closed 9 months ago
Addresses https://github.com/Amanieu/parking_lot/issues/400 by implementing https://github.com/Amanieu/parking_lot/issues/400#issuecomment-1888695827.
This PR adds
from_raw
methods forlock_api::{Mutex, ReentrantMutex, RwLock}
. These have the same behavior as the existing legacyconst_new
methods.These methods are useful with
RawMutex
, etc. implementations which don't supportconst
initialization.