Skip to main content

gc_state

Function gc_state 

Source
pub fn gc_state() -> &'static GcState
Expand description

Get a reference to the GC state.

In threading mode this is a true global (OnceLock). In non-threading mode this is thread-local, because PyRwLock/PyMutex use Cell-based locks that are not Sync.