Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

add send/sync bounds to prevent data race to RC of ArcGuard<Rc, T> #34

Merged
merged 2 commits into from
Jun 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions async-coap/src/arc_guard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ impl<RC, T> ArcGuard<RC, T> {
}
}

unsafe impl<RC, T: Send> Send for ArcGuard<RC, T> {}
unsafe impl<RC, T: Sync> Sync for ArcGuard<RC, T> {}
unsafe impl<RC: Send, T: Send> Send for ArcGuard<RC, T> {}
unsafe impl<RC: Sync, T: Sync> Sync for ArcGuard<RC, T> {}

impl<RC, T> Deref for ArcGuard<RC, T> {
type Target = T;
Expand Down