bus
bus copied to clipboard
Async review
Hi, since I need this crate for a project I'm working on, I decided to give implementing futures Stream
for a BusReceiver (Bus sending isn't async in this patch), however I am curious as to whether this implementation is correct, since I'm not too experienced with lock-free code
Basically, if a value is not ready, it sends the current Waker (kind of equivalent of thread handle) to the unparking channel, which will wake it up when it's ready.
I think @habnabit would be a good person to ping here, as they did a bunch of related work over in https://github.com/jonhoo/bus/pull/15, culminating in https://github.com/habnabit/bus/tree/async_bus