gh-117323: Make cell thread-safe in free-threaded builds (#117330)

Use critical sections to lock around accesses to cell contents. The critical sections are no-ops in the default (with GIL) build.
This commit is contained in:
Sam Gross 2024-03-29 13:35:43 -04:00 committed by GitHub
parent 397d88db5e
commit 19c1dd60c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 83 additions and 43 deletions

View file

@ -5,6 +5,7 @@
#include "Python.h"
#include "pycore_abstract.h" // _PyIndex_Check()
#include "pycore_call.h" // _PyObject_CallNoArgs()
#include "pycore_cell.h" // PyCell_GetRef()
#include "pycore_ceval.h"
#include "pycore_code.h"
#include "pycore_emscripten_signal.h" // _Py_CHECK_EMSCRIPTEN_SIGNALS