STINNER Victor <[email protected]> added the comment:
> Regarding C extensions, I think clear documentation that extension authors
> need to check for signals in any code that might run for a few hundred
> microseconds or longer is the best approach.
Python 3.10 doesn't require it. If you want to change Python 3.11 behavior,
please announce the change on python-dev and capi-sig mailing lists, and
document it carefully in What's New in Python 3.11.
I'm not talking about checking frequently interruptions while a function is
running, I'm only talking about the "end" of a C function (exit). In Python
3.10, ceval.c does it automatically.
case TARGET(CALL_FUNCTION): {
PREDICTED(CALL_FUNCTION);
PyObject **sp, *res;
sp = stack_pointer;
res = call_function(tstate, &trace_info, &sp, oparg, NULL);
stack_pointer = sp;
PUSH(res);
if (res == NULL) {
goto error;
}
CHECK_EVAL_BREAKER(); // <==== HERE
DISPATCH();
}
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue46465>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com