mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
box mutex to get a movable mutex
the commit avoid an alignement issue in Mutex implementation
This commit is contained in:
parent
77d98316f4
commit
bf268fe928
@ -155,7 +155,7 @@ pub struct Mutex {
|
|||||||
inner: Spinlock<MutexInner>,
|
inner: Spinlock<MutexInner>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type MovableMutex = Mutex;
|
pub type MovableMutex = Box<Mutex>;
|
||||||
|
|
||||||
unsafe impl Send for Mutex {}
|
unsafe impl Send for Mutex {}
|
||||||
unsafe impl Sync for Mutex {}
|
unsafe impl Sync for Mutex {}
|
||||||
|
Loading…
Reference in New Issue
Block a user