Functionsยง
- par_
buffer - Decouple stream generation and stream consumption into separate threads,
keeping not-yet-consumed elements in a bounded queue. This is similar to
stream::bufferedandsink::buffer. The key difference is thatpar_bufferis parallel rather than concurrent and will make use of multiple cores when both the stream and the stream consumer are CPU-bound. Because a new thread is spawned, the stream has to beSync,Sendand'static.