tokio-batch
An adaptor that chunks up elements and flushes them after a timeout or when the buffer is full.
Description
An adaptor that chunks up elements in a vector.
This adaptor will buffer up a list of items in the stream and pass on the vector used for buffering when a specified capacity has been reached or a predefined timeout was triggered.
Usage
use io;
use Duration;
use ;
use Runtime;
use *;
Credits
This was taken and adjusted from https://github.com/alexcrichton/futures-rs/blob/master/src/stream/chunks.rs and moved into a separate crate for usability.
Thanks to @arielb1 and @alexcrichton for their support!