mirror of
https://github.com/python/cpython.git
synced 2025-09-02 23:18:25 +00:00
bpo-47176: Interrupt handling for wasm32-emscripten builds without pthreads (GH-32209)
Co-authored-by: Christian Heimes <christian@python.org> Co-authored-by: Brett Cannon <brett@python.org>
This commit is contained in:
parent
bdc4974965
commit
087d0fa5b9
8 changed files with 124 additions and 1 deletions
|
@ -21,6 +21,7 @@
|
|||
#include "pycore_pystate.h" // _PyInterpreterState_GET()
|
||||
#include "pycore_sysmodule.h" // _PySys_Audit()
|
||||
#include "pycore_tuple.h" // _PyTuple_ITEMS()
|
||||
#include "pycore_emscripten_signal.h" // _Py_CHECK_EMSCRIPTEN_SIGNALS
|
||||
|
||||
#include "code.h"
|
||||
#include "pycore_dict.h"
|
||||
|
@ -1292,6 +1293,7 @@ eval_frame_handle_pending(PyThreadState *tstate)
|
|||
}
|
||||
|
||||
#define CHECK_EVAL_BREAKER() \
|
||||
_Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY(); \
|
||||
if (_Py_atomic_load_relaxed(eval_breaker)) { \
|
||||
goto handle_eval_breaker; \
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue