1 stable release
1.0.0 | Mar 27, 2023 |
---|
#1447 in Data structures
8KB
165 lines
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);
lib.rs
:
ljprs_async_pool
Provides an async-friendly pool data structure using tokio.
Dependencies
~2.3–8MB
~64K SLoC