Skip to content

Commit a146bef

Browse files
address final review
1 parent 8fe0fb5 commit a146bef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/c-api/object.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -805,11 +805,12 @@ Object Protocol
805805
.. c:function:: int PyUnstable_SetImmortal(PyObject *op)
806806
807807
Marks the object *op* :term:`immortal`. The argument should be uniquely referenced by
808-
the calling thread.
808+
the calling thread. This is intended to be used for reducing reference counting contention
809+
in the :term:`free-threaded build` for objects which are shared across threads.
809810
810811
This is a one-way process: objects can only be made immortal; they cannot be
811812
made mortal once again. Immortal objects do not participate in reference counting
812-
and will never be garbage collected.
813+
and will never be garbage collected. If the object is GC-tracked, it is untracked.
813814
814815
This function is intended to be used soon after *op* is created, by the code that
815816
creates it, such as in the object's :c:member:`~PyTypeObject.tp_new` slot.

0 commit comments

Comments
 (0)