mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-119344: Make critical section API public (#119353)
This makes the following macros public as part of the non-limited C-API for locking a single object or two objects at once. * `Py_BEGIN_CRITICAL_SECTION(op)` / `Py_END_CRITICAL_SECTION()` * `Py_BEGIN_CRITICAL_SECTION2(a, b)` / `Py_END_CRITICAL_SECTION2()` The supporting functions and structs used by the macros are also exposed for cases where C macros are not available.
This commit is contained in:
parent
03fa2df927
commit
8f17d69b7b
15 changed files with 459 additions and 225 deletions
|
@ -3116,7 +3116,7 @@ _PyDict_FromKeys(PyObject *cls, PyObject *iterable, PyObject *value)
|
|||
goto dict_iter_exit;
|
||||
}
|
||||
}
|
||||
dict_iter_exit:
|
||||
dict_iter_exit:;
|
||||
Py_END_CRITICAL_SECTION();
|
||||
} else {
|
||||
while ((key = PyIter_Next(it)) != NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue