box mutex to get a movable mutex
the commit avoid an alignement issue in Mutex implementation
This commit is contained in:
@@ -155,7 +155,7 @@ pub struct Mutex {
|
||||
inner: Spinlock<MutexInner>,
|
||||
}
|
||||
|
||||
pub type MovableMutex = Mutex;
|
||||
pub type MovableMutex = Box<Mutex>;
|
||||
|
||||
unsafe impl Send for Mutex {}
|
||||
unsafe impl Sync for Mutex {}
|
||||
|
||||
Reference in New Issue
Block a user