Struct pid_allocator::PidAllocator
source · pub struct PidAllocator<const ORDER: usize> { /* private fields */ }
Expand description
A thread-safe PID allocator that can allocate and recycle PIDs efficiently.
It encapsulates the allocator’s state within an Arc<SpinMutex<...>>
to allow safe shared access across threads.
Implementations§
source§impl<const ORDER: usize> PidAllocator<ORDER>
impl<const ORDER: usize> PidAllocator<ORDER>
Trait Implementations§
source§impl<const ORDER: usize> Debug for PidAllocator<ORDER>
impl<const ORDER: usize> Debug for PidAllocator<ORDER>
source§impl<const ORDER: usize> Default for PidAllocator<ORDER>
impl<const ORDER: usize> Default for PidAllocator<ORDER>
source§fn default() -> PidAllocator<ORDER>
fn default() -> PidAllocator<ORDER>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<const ORDER: usize> Freeze for PidAllocator<ORDER>
impl<const ORDER: usize> !RefUnwindSafe for PidAllocator<ORDER>
impl<const ORDER: usize> Send for PidAllocator<ORDER>
impl<const ORDER: usize> Sync for PidAllocator<ORDER>
impl<const ORDER: usize> Unpin for PidAllocator<ORDER>
impl<const ORDER: usize> !UnwindSafe for PidAllocator<ORDER>
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