Skip to content

Commit

Permalink
[compat] impl Sync for PollWatcher for FreeBSD (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
rabite0 authored and passcod committed May 22, 2019
1 parent b4ea3e7 commit 29f0297
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/poll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,3 +311,6 @@ impl Drop for PollWatcher {
self.open.store(false, Ordering::Relaxed);
}
}

// Because all public methods are `&mut self` it's also perfectly safe to share references.
unsafe impl Sync for PollWatcher {}

0 comments on commit 29f0297

Please sign in to comment.