ThreadSafeObjectPool
struct · ferroui-base · v0.5.0
struct ThreadSafeObjectPool<T>
A pool of reusable objects that can be shared between threads.
Members
new
fn new() -> Self
get
fn get(self: &Self) -> T
Takes an object out of the pool, creating one when the pool is empty.
return_and_set_null
fn return_and_set_null(self: &Self, obj: &mut Option<T>)
Puts the object back into the pool and clears the slot it came from.
default_pool
fn default_pool() -> Arc<ThreadSafeObjectPool<T>>
The process-wide pool for T.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.