boxcar
A concurrent, append-only vector.
The vector provided by this crate supports lock-free get and push operations.
The vector grows internally but never reallocates, so element addresses are stable
for the lifetime of the vector. Additionally, both get and push run in constant-time.
Examples
Appending an element to a vector and retrieving it:
let vec = new;
let i = vec.push;
assert_eq!;
The vector can be modified by multiple threads concurrently:
let vec = new;
// Spawn a few threads that append to the vector.
scope;
for i in 0..6
Elements can be mutated through fine-grained locking:
let vec = new;
scope;
let x = vec.lock.unwrap;
assert_eq!;