File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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
932932interpreter. The solution to this problem is to acquire a reference to the main
933933interpreter through :c:func: `PyInterpreterState_AsStrong `.
934934
935935But 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
938938interpreter-specific data, so it's completely safe to choose the main
939939interpreter here.
940940
You can’t perform that action at this time.
0 commit comments