Crates.io | block_pool |
lib.rs | block_pool |
version | 0.1.2 |
source | src |
created_at | 2021-12-03 23:36:39.185422 |
updated_at | 2021-12-06 04:28:12.036568 |
description | Object pool that blocks when waiting for an object. |
homepage | |
repository | https://github.com/shelbyd/block_pool |
max_upload_size | |
id | 492016 |
size | 3,549 |
A simple object pool that blocks when taking an item out.
use block_pool::Pool;
let pool = Pool::new(vec![1, 2, 3]);
let mut item = pool.take();
*item += 1;
drop(item);
License: MIT