sluice
sluice copied to clipboard
Add synchronous pipe API
Pipes are also useful in synchronous applications, which could also benefit from our performant rotating buffer implementation.
There's no technical reason why the existing PipeReader
and PipeWriter
types couldn't implement Read
and Write
respectively, but I wonder if that might get confusing which trait is being used, since Read::read
and AsyncReadExt::read
have the same name and argument types.
The API we offer must also allow the possibility of having an async producer and synchronous consumer, or vice versa.