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:
Hood Chatham 2022-04-03 13:58:52 -07:00 committed by GitHub
parent bdc4974965
commit 087d0fa5b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 124 additions and 1 deletions

View file

@ -13,6 +13,7 @@
#include "pycore_pyerrors.h" // _PyErr_SetString()
#include "pycore_pylifecycle.h" // NSIG
#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_emscripten_signal.h" // _Py_CHECK_EMSCRIPTEN_SIGNALS
#ifndef MS_WINDOWS
# include "posixmodule.h"
@ -1797,6 +1798,7 @@ PyErr_CheckSignals(void)
int
_PyErr_CheckSignalsTstate(PyThreadState *tstate)
{
_Py_CHECK_EMSCRIPTEN_SIGNALS();
if (!_Py_atomic_load(&is_tripped)) {
return 0;
}