diff options
author | kalcutter <31195032+kalcutter@users.noreply.github.com> | 2020-01-22 22:59:05 +0100 |
---|---|---|
committer | Carl Lerche <me@carllerche.com> | 2020-01-22 13:59:05 -0800 |
commit | f9ea576ccae5beffeaa2f2c48c2c0d2f9449673b (patch) | |
tree | f726788538b57d83f5e223648d7d21622ec86c41 /tokio-macros/Cargo.toml | |
parent | 7f580071f3e5d475db200d2101ff35be0b4f6efe (diff) |
sync: fix broadcast bugs (#2135)
Make sure the tail mutex is acquired when `condvar` is notified,
otherwise the wakeup may be lost and the sender could be left waiting.
Use `notify_all()` instead of `notify_one()` to ensure that the correct
sender is woken. Finally, only do any of this when there are no more
readers left.
Additionally, calling `send()` is buggy and may cause a panic when
the slot has another pending send.
Diffstat (limited to 'tokio-macros/Cargo.toml')
0 files changed, 0 insertions, 0 deletions