Skip to content

Commit

Permalink
Mark RawReentrantMutex as Send + Sync
Browse files Browse the repository at this point in the history
  • Loading branch information
coolreader18 committed May 17, 2020
1 parent 2aae5e8 commit 0b6bb25
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lock_api/src/remutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ impl<R: RawMutex, G: GetThreadId> RawReentrantMutex<R, G> {
}
}

unsafe impl<R: RawMutex + Send, G: GetThreadId + Send> Send for RawReentrantMutex<R, G> {}
unsafe impl<R: RawMutex + Sync, G: GetThreadId + Sync> Sync for RawReentrantMutex<R, G> {}

unsafe impl<R: RawMutex, G: GetThreadId> RawMutex for RawReentrantMutex<R, G> {
const INIT: Self = RawReentrantMutex {
owner: AtomicUsize::new(0),
Expand Down

0 comments on commit 0b6bb25

Please sign in to comment.