Function hopper::channel_with_max_bytes
[−]
[src]
pub fn channel_with_max_bytes<T>(name: &str,
data_dir: &Path,
max_bytes: usize)
-> Result<(Sender<T>, Receiver<T>), Error> where T: Serialize + Deserialize
Create a (Sender, Reciever) pair in a like fashion to
std::sync::mpsc::channel
This function creates a Sender and Receiver pair with name name
whose
queue files are stored in data_dir
. The Sender is clonable.
This function gives control to the user over the maximum size of hopper's
queue files as max_bytes
, though not the total disk allocation that may be
made.