Skip to content

Commit d5dd147

Browse files
committed
Remove the term 'signal handler.'
1 parent 81a71a1 commit d5dd147

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

peps/pep-0788.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ that it always works. An approach that were to return a failure based on
337337
the start-time of the thread could cause spurious issues.
338338

339339
In 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,
341341
strong 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
663663
As 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
669669
This scenario requires :c:func:`PyInterpreterState_Lookup`, which only prevents
670670
finalization when the lookup has been made.

0 commit comments

Comments
 (0)