Expand description
Synchronization mechanisms based on the Python GIL.
With the acceptance of PEP 703 (aka a “freethreaded Python”) for Python 3.13, these are likely to undergo significant developments in the future.
Modules§
- once_
lock_ 🔒ext_ sealed rustc_has_once_lock
Structs§
- GILOnce
Cell - A write-once primitive similar to
std::sync::OnceLock<T>
. - GILProtected
Non- Py_GIL_DISABLED
- Value with concurrent access protected by the GIL.
- Guard 🔒
- Interned 👻
- Implementation detail for
intern!
macro.
Traits§
- OnceExt
- Helper trait for
Once
to help avoid deadlocking when using aOnce
when attached to a Python thread. - Once
Lock Ext rustc_has_once_lock
- interpreter and initialization with the
OnceLock
.
Functions§
- init_
once_ 🔒force_ py_ attached - init_
once_ 🔒lock_ py_ attached rustc_has_once_lock
- init_
once_ 🔒py_ attached - with_
critical_ section - Executes a closure with a Python critical section held on an object.