Expand description
Interaction with attachment of the current thread to the Python interpreter.
Structsยง
- Forbid
Attaching ๐ - Used to lock safe access to the interpreter
- Reference
Pool ๐Non- pyo3_disable_reference_pool - Thread-safe storage for objects which were dec_ref while not attached.
- Suspend
Attach ๐ - A guard which can be used to temporarily detach from the interpreter and restore on
Drop.
Enumsยง
- Attach
Error ๐ - Possible error when calling
try_attach() - Attach
Guard ๐ - RAII type that represents thread attachment to the interpreter.
Constantsยง
- ATTACH_
COUNT ๐ - This is an internal counter in pyo3 monitoring whether this thread is attached to the interpreter.
- ATTACH_
FORBIDDEN_ ๐DURING_ TRAVERSE
Staticsยง
- POOL ๐
Non- pyo3_disable_reference_pool
Functionsยง
- decrement_
attach_ ๐count - Decrements pyo3โs internal attach count - to be called whenever AttachGuard is dropped.
- drop_
deferred_ ๐references - get_
pool ๐Non- pyo3_disable_reference_pool - increment_
attach_ ๐count - Increments pyo3โs internal attach count - to be called whenever an AttachGuard is created.
- is_
in_ ๐gc_ traversal Non- Py_LIMITED_APIorPy_3_11 - Private helper function to check if we are currently in a GC traversal (as detected by PyO3).
- register_
decref โ - Registers a Python object pointer inside the release pool, to have its reference count decreased the next time the thread is attached in pyo3.
- thread_
is_ ๐attached - Checks whether the thread is attached to the Python interpreter.
Type Aliasesยง
- PyObj
Vec ๐Non- pyo3_disable_reference_pool