Expand description
Interaction with Pythonβs global interpreter lock
StructsΒ§
- LockGIL π
- Used to lock safe access to the GIL
- ReferencePool πNon- pyo3_disable_reference_pool
- Thread-safe storage for objects which were dec_ref while the GIL was not held.
- SuspendGIL π
- A guard which can be used to temporarily release the GIL and restore on Drop.
EnumsΒ§
- GILGuard π
- RAII type that represents the Global Interpreter Lock acquisition.
ConstantsΒ§
- GIL_COUNT π
- This is an internal counter in pyo3 monitoring whether this thread has the GIL.
- GIL_LOCKED_ πDURING_ TRAVERSE 
StaticsΒ§
FunctionsΒ§
- decrement_gil_ πcount 
- Decrements pyo3βs internal GIL count - to be called whenever GILPool or GILGuard is dropped.
- gil_is_ πacquired 
- Checks whether the GIL is acquired.
- increment_gil_ πcount 
- Increments pyo3βs internal GIL count - to be called whenever GILPool or GILGuard is created.
- prepare_freethreaded_ python Neither PyPynorGraalPy
- Prepares the use of Python in a free-threaded context.
- register_decref β
- Registers a Python object pointer inside the release pool, to have its reference count decreased the next time the GIL is acquired in pyo3.
- register_incref βpy-clone
- Increments the reference count of a Python object if the GIL is held. If the GIL is not held, this function will panic.
- with_embedded_ βpython_ interpreter Neither PyPynorGraalPy
- Executes the provided closure with an embedded Python interpreter.
Type AliasesΒ§
- PyObjVec π