Skip to content

Commit

Permalink
Add note about using cells in the locks on the 'unsupported' platform.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ou-se committed Oct 13, 2020
1 parent f1c3edb commit b26aa5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions library/std/src/sys/unsupported/mutex.rs
Original file line number Diff line number Diff line change
@@ -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>,
}

Expand Down
1 change: 1 addition & 0 deletions library/std/src/sys/unsupported/rwlock.rs
Original file line number Diff line number Diff line change
@@ -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>,
}

Expand Down

0 comments on commit b26aa5d

Please sign in to comment.