pub struct RetiredSet<'s> {
hazards: &'s HazardBag,
inner: Vec<(*mut (), unsafe fn(*mut ()))>,
_marker: PhantomData<*const ()>,
}
Expand description
Thread-local list of retired pointers.
Fields§
§hazards: &'s HazardBag
§inner: Vec<(*mut (), unsafe fn(*mut ()))>
The first element of the pair is the machine representation of the pointer and the second
is the function pointer to free::<T>
where T
is the type of the object.
_marker: PhantomData<*const ()>
Implementations§
Source§impl<'s> RetiredSet<'s>
impl<'s> RetiredSet<'s>
Sourceconst THRESHOLD: usize = 64usize
const THRESHOLD: usize = 64usize
The max length of retired pointer list. collect
is triggered when THRESHOLD
pointers
are retired.
Sourcepub fn new(hazards: &'s HazardBag) -> Self
pub fn new(hazards: &'s HazardBag) -> Self
Create a new retired pointer list protected by the given HazardBag
.
Trait Implementations§
Source§impl<'s> Debug for RetiredSet<'s>
impl<'s> Debug for RetiredSet<'s>
Source§impl Default for RetiredSet<'static>
impl Default for RetiredSet<'static>
Auto Trait Implementations§
impl<'s> Freeze for RetiredSet<'s>
impl<'s> RefUnwindSafe for RetiredSet<'s>
impl<'s> !Send for RetiredSet<'s>
impl<'s> !Sync for RetiredSet<'s>
impl<'s> Unpin for RetiredSet<'s>
impl<'s> UnwindSafe for RetiredSet<'s>
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