cpython/Python
Sam Gross 441affc9e7
gh-111964: Implement stop-the-world pauses (gh-112471)
The `--disable-gil` builds occasionally need to pause all but one thread.  Some
examples include:

* Cyclic garbage collection, where this is often called a "stop the world event"
* Before calling `fork()`, to ensure a consistent state for internal data structures
* During interpreter shutdown, to ensure that daemon threads aren't accessing Python objects

This adds the following functions to implement global and per-interpreter pauses:

* `_PyEval_StopTheWorldAll()` and `_PyEval_StartTheWorldAll()` (for the global runtime)
* `_PyEval_StopTheWorld()` and `_PyEval_StartTheWorld()` (per-interpreter)

(The function names may change.)

These functions are no-ops outside of the `--disable-gil` build.
2024-01-23 11:08:23 -07:00
..
clinic gh-113626: Add allow_code parameter in marshal functions (GH-113648) 2024-01-16 18:05:15 +02:00
deepfreeze
frozen_modules
_warnings.c
adaptive.md
asdl.c
asm_trampoline.S
assemble.c
ast.c GH-113655: Lower the C recursion limit on various platforms (GH-113944) 2024-01-16 09:32:01 +00:00
ast_opt.c GH-113655: Lower the C recursion limit on various platforms (GH-113944) 2024-01-16 09:32:01 +00:00
ast_unparse.c
bltinmodule.c
bootstrap_hash.c
bytecodes.c gh-113102: Fix typo in INSTRUMENTED_RESUME (GH-114349) 2024-01-22 11:56:28 +00:00
ceval.c GH-113860: Get rid of _PyUOpExecutorObject (GH-113954) 2024-01-12 11:58:23 +00:00
ceval_gil.c gh-111964: Implement stop-the-world pauses (gh-112471) 2024-01-23 11:08:23 -07:00
ceval_macros.h Delete unused macro (GH-114238) 2024-01-18 15:49:50 +00:00
codecs.c
compile.c gh-107901: synthetic jumps which are not at end of loop no longer check the eval breaker (#113721) 2024-01-06 14:20:08 +00:00
condvar.h
context.c gh-111968: Use per-thread freelists for PyContext in free-threading (gh-114122) 2024-01-16 16:14:56 +00:00
critical_section.c
crossinterp.c
dtoa.c
dup2.c
dynamic_annotations.c
dynload_hpux.c
dynload_shlib.c
dynload_stub.c
dynload_win.c
emscripten_signal.c
emscripten_trampoline.c
errors.c
executor_cases.c.h GH-112354: _GUARD_IS_TRUE_POP side-exits to target the next instruction, not themselves. (GH-114078) 2024-01-15 11:41:06 +00:00
fileutils.c
flowgraph.c gh-114083: apply optimization of LOAD_CONST instructions to the whole CFG before optimize_basic_block. (#114408) 2024-01-22 17:12:06 +00:00
formatter_unicode.c
frame.c
frozen.c
frozenmain.c
future.c
gc.c gh-112529: Use GC heaps for GC allocations in free-threaded builds (gh-114157) 2024-01-21 01:14:45 +09:00
gc_free_threading.c gh-111968: Use per-thread freelists for generator in free-threading (gh-114189) 2024-01-18 18:15:00 +00:00
gc_gil.c gh-111968: Use per-thread freelists for generator in free-threading (gh-114189) 2024-01-18 18:15:00 +00:00
generated_cases.c.h gh-113102: Fix typo in INSTRUMENTED_RESUME (GH-114349) 2024-01-22 11:56:28 +00:00
getargs.c
getcompiler.c
getcopyright.c Update copyright years to 2024. (GH-113608) 2024-01-16 21:54:05 +01:00
getopt.c
getplatform.c
getversion.c
hamt.c
hashtable.c
import.c
importdl.c
initconfig.c gh-73965: Move PYTHON_HISTORY into the correct usage section (#113798) 2024-01-08 11:58:58 +02:00
instrumentation.c GH-113486: Do not emit spurious PY_UNWIND events for optimized calls to classes. (GH-113680) 2024-01-05 09:45:22 +00:00
intrinsics.c
legacy_tracing.c
lock.c
marshal.c gh-113626: Add allow_code parameter in marshal functions (GH-113648) 2024-01-16 18:05:15 +02:00
modsupport.c
mysnprintf.c
mystrtoul.c
opcode_targets.h
optimizer.c GH-112354: _GUARD_IS_TRUE_POP side-exits to target the next instruction, not themselves. (GH-114078) 2024-01-15 11:41:06 +00:00
optimizer_analysis.c GH-113860: Get rid of _PyUOpExecutorObject (GH-113954) 2024-01-12 11:58:23 +00:00
parking_lot.c
pathconfig.c
perf_trampoline.c
preconfig.c
pyarena.c
pyctype.c
pyfpe.c
pyhash.c
pylifecycle.c gh-111968: Use per-thread freelists for generator in free-threading (gh-114189) 2024-01-18 18:15:00 +00:00
pymath.c
pystate.c gh-111964: Implement stop-the-world pauses (gh-112471) 2024-01-23 11:08:23 -07:00
pystrcmp.c
pystrhex.c
pystrtod.c
Python-ast.c GH-113655: Lower the C recursion limit on various platforms (GH-113944) 2024-01-16 09:32:01 +00:00
Python-tokenize.c
pythonrun.c
pytime.c
README
specialize.c gh-89811: Check for valid tp_version_tag in specializer (GH-113558) 2024-01-11 13:33:05 +08:00
stdlib_module_names.h gh-110721: Remove unused code from suggestions.c after moving PyErr_Display to use the traceback module (#113712) 2024-01-08 15:10:45 +00:00
structmember.c
suggestions.c gh-113845: Fix a compiler warning in Python/suggestions.c (GH-113949) 2024-01-11 20:31:24 +02:00
symtable.c GH-113655: Lower the C recursion limit on various platforms (GH-113944) 2024-01-16 09:32:01 +00:00
sysmodule.c gh-114384: Align sys.set_asyncgen_hooks signature in docs to reflect implementation (#114385) 2024-01-21 13:49:49 +01:00
thread.c
thread_nt.h
thread_pthread.h
thread_pthread_stubs.h
traceback.c GH-113655: Lower the C recursion limit on various platforms (GH-113944) 2024-01-16 09:32:01 +00:00
tracemalloc.c
vm-state.md

Miscellaneous source files for the main Python shared library