Synchronized Writer
A tiny implement for synchronously writing data.
Examples
SynchronizedWriter
use SynchronizedWriter;
use ;
use thread;
use Write;
let data = new;
let data_arc = new;
let mut threads = Vec with_capacity;
for _ in 0..10
for thread in threads
assert_eq!;
SynchronizedOptionWriter
use SynchronizedOptionWriter;
use ;
use Write;
let data = new;
let data_arc = new;
let mut writer = new;
writer.write.unwrap;
writer.flush.unwrap;
let data = data_arc.lock.unwrap.take.unwrap; // remove out the vec from arc
assert_eq!;
Crates.io
https://crates.io/crates/synchronized-writer
Documentation
https://docs.rs/synchronized-writer