lockfree-object-pool 0.1.6

A thread-safe object pool collection with automatic return and attach/detach semantics.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use lockfree_object_pool::NoneObjectPool;

#[test]
fn test_none() {
    let pool = NoneObjectPool::<u32>::new(Default::default);
    for _ in 0..2 {
        let mut _v = pool.pull();
        assert!(*_v == 0);
        *_v += 1;
    }
}