pub enum GcState {
Pause,
Propagate,
EnterAtomic,
Atomic,
SweepAllGc,
SweepFinObj,
SweepToBeFnz,
SweepEnd,
CallFin,
}Expand description
Phases of the incremental collection cycle.
The state machine matches a simplified subset of C-Lua’s lgc.c FSM and
is driven by Heap::incremental_step_with_post_mark.
Transitions:
Pause→Propagate(on first step: reset colors, trace roots).Propagate→EnterAtomic(when the gray queue empties).EnterAtomic→Atomic(atomic phase is about to run).Atomic→SweepAllGc(post-mark hook has run; sweep cursor is initialized).SweepAllGc→SweepFinObj(allgc sweep cursor reached the end).SweepFinObj→SweepToBeFnz(finobj sweep cursor reached the end).SweepToBeFnz→SweepEnd(tobefnz sweep cursor reached the end).SweepEnd→CallFin(finish sweep bookkeeping).CallFin→Pause(cycle is complete).
Collecting is kept as a compatibility alias for the old API (used by
barrier) — it means “anything but Pause.”
Variants§
Implementations§
Trait Implementations§
impl Copy for GcState
impl Eq for GcState
impl StructuralPartialEq for GcState
Auto Trait Implementations§
impl Freeze for GcState
impl RefUnwindSafe for GcState
impl Send for GcState
impl Sync for GcState
impl Unpin for GcState
impl UnsafeUnpin for GcState
impl UnwindSafe for GcState
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