@@ -104,18 +104,18 @@ Cyclic Isolate Destruction
104104--------------------------
105105
106106Listed below are the stages of life of a hypothetical :term:`cyclic isolate`
107- that continues to exist after each member object is finalized or cleared. It is
108- a bug if a cyclic isolate progresses through all of these stages; it should
109- vanish once all objects are cleared, if not sooner. A cyclic isolate can vanish
110- either because the reference cycle is broken or because the objects are no
111- longer isolated due to finalizer resurrection (see
107+ that continues to exist after each member object is finalized or cleared. It
108+ is a bug if a cyclic isolate progresses through all of these stages; it should
109+ vanish once all objects are cleared, if not sooner. A cyclic isolate can
110+ vanish either because the reference cycle is broken or because the objects are
111+ no longer isolated due to finalizer resurrection (see
112112:c:member:`~ PyTypeObject.tp_finalize`).
113113
1141140. ** Reachable** (pre-cyclic isolate): All objects are in their normal,
115115 reachable state. A reference cycle exists, but an external reference means
116116 the objects are not yet isolated.
117- #. ** Unreachable but consistent:** The final reference from outside the group of
118- objects has been removed, causing the objects to become isolated (thus a
117+ #. ** Unreachable but consistent:** The final reference from outside the group
118+ of objects has been removed, causing the objects to become isolated (thus a
119119 cyclic isolate is born). None of the group's objects have been finalized or
120120 cleared yet.
121121#. ** Mix of finalized and not finalized:** Objects in a cyclic isolate are
@@ -143,13 +143,13 @@ isolate would result in a dangling pointer, triggering undefined behavior when
143143an object referencing the destroyed object is itself destroyed.
144144
145145:c:member:`~ PyTypeObject.tp_finalize` is not needed to safely destroy a cyclic
146- isolate, but its existence makes it easier to design types that behave in a sane
147- manner when objects are cleared. Clearing an object might necessarily leave it
148- in a broken state---it might be unsafe to call any of the cleared object' s
149- methods or access any of its attributes. With finalization, only finalized
150- objects can possibly interact with cleared objects; non-finalized objects are
151- guaranteed to interact with only non-cleared (but potentially finalized)
152- objects.
146+ isolate, but its existence makes it easier to design types that behave in a
147+ sane manner when objects are cleared. Clearing an object might necessarily
148+ leave it in a broken state---it might be unsafe to call any of the cleared
149+ object' s methods or access any of its attributes. With finalization, only
150+ finalized objects can possibly interact with cleared objects; non-finalized
151+ objects are guaranteed to interact with only non-cleared (but potentially
152+ finalized) objects.
153153
154154To summarize the possible interactions:
155155
0 commit comments