austinjones / postage-rs

The feature-rich, portable async channel library
MIT License
251 stars 9 forks source link

Minimize the number of woken senders/receivers #41

Open austinjones opened 3 years ago

austinjones commented 3 years ago

Other channel implementations (such as the async-std channel) limit the number of woken senders/receivers. It would be trivial to implement this in the Notifier struct.

However, it needs some thought. It would require some kind of guard, as stored wakers could refer to futures that have been dropped. These 'dead wakers' would deadlock the channel if invoked.