Skip to content

Commit

Permalink
Merge pull request #16 from tokio-rs/master
Browse files Browse the repository at this point in the history
Keep lock until sender notified (tokio-rs#2302)
  • Loading branch information
sthagen committed Mar 9, 2020
2 parents b99a9ba + 826fc21 commit 88c257b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tokio/src/sync/broadcast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ impl<T> Slot<T> {
if 1 == self.lock.fetch_sub(2, SeqCst) - 2 {
// First acquire the lock to make sure our sender is waiting on the
// condition variable, otherwise the notification could be lost.
let _ = tail.lock().unwrap();
let _lock = tail.lock().unwrap();
// Wake up senders
condvar.notify_all();
}
Expand Down

0 comments on commit 88c257b

Please sign in to comment.