Skip to content

Commit 3e690fb

Browse files
committed
Unlocking the mutex only has to be Release, not AcqRel.
Signed-off-by: Gary Guo <[email protected]>
1 parent c252618 commit 3e690fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sync/mutex.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl RawMutex {
6060
/// Unlock this mutex.
6161
#[inline]
6262
pub fn unlock(&self) {
63-
let state = self.state.fetch_and(!LOCK, Ordering::AcqRel);
63+
let state = self.state.fetch_and(!LOCK, Ordering::Release);
6464

6565
// If there are any blocked tasks, wake one of them up.
6666
if state & BLOCKED != 0 {

0 commit comments

Comments
 (0)