summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_runtime.h
Commit message (Collapse)AuthorAgeFilesLines
* bpo-42882: _PyRuntimeState_Init() leaves unicode next_index unchanged (GH-24193)Victor Stinner2021-01-121-0/+4
| | | | | | | | Fix the _PyUnicode_FromId() function (_Py_IDENTIFIER(var) API) when Py_Initialize() / Py_Finalize() is called multiple times: preserve _PyRuntime.unicode_ids.next_index value. Use _PyRuntimeState_INIT macro instead memset(0) to reset _PyRuntimeState members to zero.
* bpo-39465: Fix _PyUnicode_FromId() for subinterpreters (GH-20058)Victor Stinner2020-12-251-0/+7
| | | | | | | | | | | | | | | | | Make _PyUnicode_FromId() function compatible with subinterpreters. Each interpreter now has an array of identifier objects (interned strings decoded from UTF-8). * Add PyInterpreterState.unicode.identifiers: array of identifiers objects. * Add _PyRuntimeState.unicode_ids used to allocate unique indexes to _Py_Identifier. * Rewrite the _Py_Identifier structure. Microbenchmark on _PyUnicode_FromId(&PyId_a) with _Py_IDENTIFIER(a): [ref] 2.42 ns +- 0.00 ns -> [atomic] 3.39 ns +- 0.00 ns: 1.40x slower This change adds 1 ns per _PyUnicode_FromId() call in average.
* PyOS_AfterFork_Child() uses PyStatus (GH-20596)Victor Stinner2020-06-021-1/+1
| | | | | | | | PyOS_AfterFork_Child() helper functions now return a PyStatus: PyOS_AfterFork_Child() is now responsible to handle errors. * Move _PySignal_AfterFork() to the internal C API * Add #ifdef HAVE_FORK on _PyGILState_Reinit(), _PySignal_AfterFork() and _PyInterpreterState_DeleteExceptMain().
* bpo-40513: Per-interpreter GIL (GH-19943)Victor Stinner2020-05-051-0/+2
| | | | | | | | In the experimental isolated subinterpreters build mode, the GIL is now per-interpreter. Move gil from _PyRuntimeState.ceval to PyInterpreterState.ceval. new_interpreter() always get the config from the main interpreter.
* Revert "bpo-40513: Per-interpreter signals pending (GH-19924)" (GH-19932)Victor Stinner2020-05-051-0/+5
| | | This reverts commit 4e01946cafca0cf49f796c3118e0d65237bcad69.
* bpo-40513: Per-interpreter recursion_limit (GH-19929)Victor Stinner2020-05-051-1/+0
| | | | | | | | | | | Move recursion_limit member from _PyRuntimeState.ceval to PyInterpreterState.ceval. * Py_SetRecursionLimit() now only sets _Py_CheckRecursionLimit of ceval.c if the current Python thread is part of the main interpreter. * Inline _Py_MakeEndRecCheck() into _Py_LeaveRecursiveCall(). * Convert _Py_RecursionLimitLowerWaterMark() macro into a static inline function.
* bpo-40513: Per-interpreter gil_drop_request (GH-19927)Victor Stinner2020-05-051-2/+0
| | | | Move gil_drop_request member from _PyRuntimeState.ceval to PyInterpreterState.ceval.
* bpo-40513: Per-interpreter signals pending (GH-19924)Victor Stinner2020-05-051-2/+0
| | | | Move signals_pending from _PyRuntime.ceval to PyInterpreterState.ceval.
* bpo-40232: Update PyOS_AfterFork_Child() to use _PyThread_at_fork_reinit() ↵Dong-hee Na2020-04-141-1/+2
| | | | (GH-19450)
* bpo-40268: Add pycore_runtime.h header file (GH-19493)Victor Stinner2020-04-131-0/+143
Move PyRuntimeState from pycore_pystate.h to pycore_runtime.h. Remove _PyGILState_check_enabled macro: access directly _PyRuntime.gilstate.check_enabled.