Skip to content

Commit 1d41eb6

Browse files
committed
Use 'callback parameter' instead of 'closure'.
1 parent 6f45d71 commit 1d41eb6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

peps/pep-0788.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -924,17 +924,17 @@ deadlock the interpreter if it's not released.
924924
Py_RETURN_NONE;
925925
}
926926
927-
Example: Calling Python Without a Closure
928-
*****************************************
927+
Example: Calling Python Without a Callback Parameter
928+
****************************************************
929929

930-
There are a few cases where callback functions don't take a closure
930+
There are a few cases where callback functions don't take a callback parameter
931931
(``void *arg``), so it's impossible to acquire a reference to any specific
932932
interpreter. The solution to this problem is to acquire a reference to the main
933933
interpreter through :c:func:`PyInterpreterState_AsStrong`.
934934

935935
But wait, won't that break with subinterpreters, per
936936
:ref:`pep-788-subinterpreters-gilstate`? Fortunately, since the callback has
937-
no closure, it's not possible for the caller to pass any objects or
937+
no callback parameter, it's not possible for the caller to pass any objects or
938938
interpreter-specific data, so it's completely safe to choose the main
939939
interpreter here.
940940

0 commit comments

Comments
 (0)