Struct netidx_core::pool::Pool
source · pub struct Pool<T: Poolable + Send + 'static>(/* private fields */);
Expand description
a lock-free, thread-safe, dynamically-sized object pool.
this pool begins with an initial capacity and will continue creating new objects on request when none are available. Pooled objects are returned to the pool on destruction.
if, during an attempted return, a pool already has
maximum_capacity
objects in the pool, the pool will throw away
that object.
Implementations§
source§impl<T: Poolable + Send + 'static> Pool<T>
impl<T: Poolable + Send + 'static> Pool<T>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Pool<T>
impl<T> RefUnwindSafe for Pool<T>
impl<T> Send for Pool<T>
impl<T> Sync for Pool<T>
impl<T> Unpin for Pool<T>
impl<T> UnwindSafe for Pool<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more