mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
Add note about using cells in the locks on the 'unsupported' platform.
This commit is contained in:
parent
f1c3edbfab
commit
b26aa5d973
@ -1,6 +1,7 @@
|
||||
use crate::cell::Cell;
|
||||
|
||||
pub struct Mutex {
|
||||
// This platform has no threads, so we can use a Cell here.
|
||||
locked: Cell<bool>,
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
use crate::cell::Cell;
|
||||
|
||||
pub struct RWLock {
|
||||
// This platform has no threads, so we can use a Cell here.
|
||||
mode: Cell<isize>,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user