sluice icon indicating copy to clipboard operation
sluice copied to clipboard

Add synchronous pipe API

Open sagebind opened this issue 4 years ago • 1 comments

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.

sagebind avatar Feb 06 '20 16:02 sagebind