@@ -337,7 +337,7 @@ that it always works. An approach that were to return a failure based on
337337the start-time of the thread could cause spurious issues.
338338
339339In the case where it is useful to let the interpreter finalize, such as in
340- a signal handler where there's no guarantee that the thread will start,
340+ an asynchronous callback where there's no guarantee that the thread will start,
341341strong references to an interpreter can be acquired through
342342:c:func: `PyInterpreterState_Lookup `.
343343
@@ -409,7 +409,7 @@ A non-zero reference count prevents the interpreter from finalizing.
409409 Similar to :c:func:`PyInterpreterState_Hold`, but looks up an interpreter
410410 based on an ID (see :c:func: `PyInterpreterState_GetID `). This has the
411411 benefit of allowing the interpreter to finalize in cases where the thread
412- might not start, such as inside of a signal handler .
412+ might not start, such as inside of an asynchronous callback .
413413
414414 This function will return ``NULL`` without an exception set on failure.
415415 If the return value is non-``NULL``, then the returned interpreter will be
@@ -661,10 +661,10 @@ Asynchronous callback example
661661*****************************
662662
663663As stated in the Motivation _, there are many cases where it's desirable
664- to call Python in an asynchronous callback, such as a signal handler. In that
665- case, it's not safe to call :c:func: `PyInterpreterState_Hold `, because it's
666- not guaranteed that :c:func: `PyThreadState_Ensure ` will ever be called, which
667- would deadlock finalization.
664+ to call Python in an asynchronous callback. In that case, it's not safe to
665+ call :c:func: `PyInterpreterState_Hold `, because it's not guaranteed that
666+ :c:func: `PyThreadState_Ensure ` will ever be called, which would deadlock
667+ finalization.
668668
669669This scenario requires :c:func: `PyInterpreterState_Lookup `, which only prevents
670670finalization when the lookup has been made.
0 commit comments