Skip to content

Commit

Permalink
[compat] impl Sync for PollWatcher for FreeBSD (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
rabite0 authored and passcod committed May 22, 2019
1 parent d9a2ef4 commit 03ea5d3
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 @@ -310,3 +310,6 @@ impl Drop for PollWatcher {
}
}
}

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

0 comments on commit 03ea5d3

Please sign in to comment.