eta_obj_pool

Crates.ioeta_obj_pool
lib.rseta_obj_pool
version1.1.0
sourcesrc
created_at2025-03-06 11:22:36.249901+00
updated_at2025-03-06 11:36:01.283071+00
descriptionThread safe object pool
homepage
repository
max_upload_size
id1580985
size14,787
erik9631 (erik9631)

documentation

README

ETA POOL

A simple thread safe object pool implementation in Rust.

Usage

use eta_obj_pool::pool::FixedPool;

let pool = FixedPool::new(vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10]).unwrap(); /// Or any vector of elements

for _ in 0..10 {
    let element = pool.acquire().unwrap();
    println!("{}", element.get());
}

The objects acquired from the proxies are automatically returned to the pool when they are dropped.

Commit count: 0

cargo fmt