ljprs_async_pool

Crates.ioljprs_async_pool
lib.rsljprs_async_pool
version1.0.0
sourcesrc
created_at2023-03-27 05:27:23.333305
updated_at2023-03-27 05:27:23.333305
descriptionProvides an async-friendly pool data structure using tokio.
homepagehttps://github.com/lukejoshuapark/ljprs_async_pool
repositoryhttps://github.com/lukejoshuapark/ljprs_async_pool
max_upload_size
id821762
size12,289
Luke Joshua Park (lukejoshuapark)

documentation

README

ljprs_async_pool

Provides an async-friendly pool data structure using tokio.

Usage Example

use std::io;
use ljprs_async_pool::AsyncPool;

async fn initializer_fn() -> Result<i32, io::Error> {
    Ok(42)
}

let pool = AsyncPool::new(16, initializer_fn);
let guard = pool.get().await;
assert!(guard.is_ok());
assert_eq!(*(guard.unwrap()), 42);
Commit count: 1

cargo fmt