Skip to content

Commit

Permalink
Merge pull request #69 from mbrubeck/ptr_eq
Browse files Browse the repository at this point in the history
Fix nondeterministic bug in RecvSelection::deinit
  • Loading branch information
zesterer authored Feb 7, 2021
2 parents 0c5ee68 + cdb4145 commit 2bba4be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ impl<'a, T> Selector<'a, T> {
let hook: Arc<Hook<U, dyn Signal>> = hook;
wait_lock(&self.receiver.shared.chan)
.waiting
.retain(|s| !Arc::ptr_eq(s, &hook));
.retain(|s| s.signal().as_ptr() != hook.signal().as_ptr());
// If we were woken, but never polled, wake up another
if !self.received
&& hook
Expand Down

0 comments on commit 2bba4be

Please sign in to comment.