async-std
async-std copied to clipboard
Consider making waker_set its own crate
I think the waker_set implementation is useful in it's own right. At the very least futures-util has something very similar and could probably benefit from sharing the waker_set implementation between the crates. It also may be useful in implementing other synchronization abstractions or combinators that need to keep track of a list of tasks to notify.
@tmccombs agree, that'd be great. I think @stjepang and I talked about it offline a while back, but we would like to also be able to share AtomicWaker
alongside WakerSet
.
Maybe we could use the async-utils
name for this?
I wrote a standalone crate similar to WakerSet: https://github.com/tmccombs/waitlist. In fact it started out as just a separate crate for WakerSet, but then I had some ideas I wanted to try out it ended up rather different than the original WakerSet.
There is https://github.com/stjepang/piper/blob/master/src/event.rs now, which is very similar, but not yet exposed from the crate itself.
What are the plans for the WakerSet? In this issue #728 it was stated that WakerSet was meant to be put in the async-utils crate. However, async-utils seems to be not active.
Seen the comment from @dignifiedquire , is the event-listener from @stjepang meant to be a replacement for the WakerSet?