Crate xstream_util
source ·Expand description
xstream library
Provides [xstream] to take a BufRead
and splits it as input among several processes.
There’s current not any async support, and therefore no real way to interact with the processes
afterwards. Even collecting the output would require effort / synchronization, so currently
they’re all just piped to the standard inhereted buffers.
Usage
use std::process::Command;
use xstream_util::Limiting;
let mut input = // ...
// Spawn up to two `cat` processes, could also use `Rotating`
let mut pool = Limiting::new(Command::new("cat"), 2);
xstream_util::xstream(&mut pool, &mut input, &b"\n", &None::<&[u8]>).unwrap();
Structs
- A pool to manage spawning a limited number of processses
- A pool to manage spawning a limited number of processses
Enums
- An error raised by
xstream
Traits
- A type that can
get
child processes on demand
Functions
- Stream one reader into several independent processes