You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to play with std::io::Read/std::io::Write, check out the ringbuf crate directly, as it's Producer and Consumer types implement these traits, so I didn't include them here.
If I understand this correctly, this crate is a blocking+async wrapper around the ringbuf crate. My use case however requires having one side Write and the other side AsyncRead. I think this would fit quite well into this crate (simply copy the code and strip half of the work ^^)
The text was updated successfully, but these errors were encountered:
This is an interesting requirement. Is it an option for you to use block_on in the sync part? It would be the easiest solution. If not I could add Read and Write to futures_ringbuf.
Yes, I've written a simple AsyncWrite -> Write adapter that uses block_on internally (this probably also exists in some helper library but it was few enough lines of code to build ad-hoc). It works fine, but conceptually it feels wasteful having compatibility layers going back and forth like this.
ringbuf already provides Read and Write implementations, but the key difference is that those are not blocking, returning Err(WouldBlock) instead.
If I understand this correctly, this crate is a blocking+async wrapper around the
ringbuf
crate. My use case however requires having one sideWrite
and the other sideAsyncRead
. I think this would fit quite well into this crate (simply copy the code and strip half of the work ^^)The text was updated successfully, but these errors were encountered: