#[repr(align(64))]pub struct LockFreePool<T> { /* private fields */ }
Expand description
Lock-free memory pool implementation using Michael & Scott algorithm.
Implementations§
Source§impl<T> LockFreePool<T>
impl<T> LockFreePool<T>
Sourcepub fn deallocate(&self, item: T) -> Result<(), T>
pub fn deallocate(&self, item: T) -> Result<(), T>
Return an object to the pool (lock-free).
Sourcepub fn total_allocations(&self) -> u64
pub fn total_allocations(&self) -> u64
Get total number of allocations.
Sourcepub fn total_deallocations(&self) -> u64
pub fn total_deallocations(&self) -> u64
Get total number of deallocations.
Sourcepub fn contention_events(&self) -> u64
pub fn contention_events(&self) -> u64
Get contention events count.
Auto Trait Implementations§
impl<T> !Freeze for LockFreePool<T>
impl<T> RefUnwindSafe for LockFreePool<T>
impl<T> Send for LockFreePool<T>
impl<T> Sync for LockFreePool<T>
impl<T> Unpin for LockFreePool<T>
impl<T> UnwindSafe for LockFreePool<T>where
T: RefUnwindSafe,
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