No longer put windows mutexes in a box.
Windows SRW locks are movable (while not borrowed) according to their documentation.
This commit is contained in:
parent
4f1353e54f
commit
dc81cbdcb1
1 changed files with 4 additions and 1 deletions
|
@ -29,7 +29,10 @@ pub struct Mutex {
|
||||||
lock: AtomicUsize,
|
lock: AtomicUsize,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type MovableMutex = Box<Mutex>;
|
// Windows SRW Locks are movable (while not borrowed).
|
||||||
|
// ReentrantMutexes (in Inner) are not, but those are stored indirectly through
|
||||||
|
// a Box, so do not move when the Mutex it self is moved.
|
||||||
|
pub type MovableMutex = Mutex;
|
||||||
|
|
||||||
unsafe impl Send for Mutex {}
|
unsafe impl Send for Mutex {}
|
||||||
unsafe impl Sync for Mutex {}
|
unsafe impl Sync for Mutex {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue