From 29f029743f3a4d517125c501b310cd0aa59278bc Mon Sep 17 00:00:00 2001 From: rabite0 Date: Wed, 22 May 2019 12:48:20 +0200 Subject: [PATCH] [compat] impl Sync for PollWatcher for FreeBSD (#197) --- src/poll.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/poll.rs b/src/poll.rs index 41117f21..3334fd41 100644 --- a/src/poll.rs +++ b/src/poll.rs @@ -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 {}