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.
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.