Skip to content

Commit

Permalink
Improve ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnwa committed Sep 5, 2020
1 parent 7a47df1 commit 84baaef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ impl<'a, T: ?Sized> Future for MutexGuardFuture<'a, T> {
let _ = self.mutex.waker.compare_exchange_weak(
null_mut(),
cx.waker() as *const Waker as *mut Waker,
Ordering::Relaxed,
Ordering::Relaxed,
Ordering::AcqRel,
Ordering::Acquire,
);
}
Poll::Pending
Expand All @@ -153,8 +153,8 @@ impl<T: ?Sized> Future for MutexOwnedGuardFuture<T> {
let _ = self.mutex.waker.compare_exchange_weak(
null_mut(),
cx.waker() as *const Waker as *mut Waker,
Ordering::Relaxed,
Ordering::Relaxed,
Ordering::AcqRel,
Ordering::Acquire,
);
}

Expand Down

0 comments on commit 84baaef

Please sign in to comment.