bus icon indicating copy to clipboard operation
bus copied to clipboard

Async review

Open SethDusek opened this issue 4 years ago • 1 comments

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

lib.rs

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.

SethDusek avatar Sep 10 '19 09:09 SethDusek

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

jonhoo avatar Sep 10 '19 13:09 jonhoo