gh-99113: A Per-Interpreter GIL! by ericsnowcurrently · Pull Request #104209 · python/cpython · GitHub
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Include/internal/pycore_ceval.h
3 changes: 2 additions & 1 deletion Include/internal/pycore_gil.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ extern "C" {
#undef FORCE_SWITCHING
#define FORCE_SWITCHING

struct _gil_runtime_state {
/* ** The GIL ** */
struct _gil_state {
/* microseconds (the Python API uses seconds, though) */
unsigned long interval;
/* Last PyThreadState holding / having held the GIL. This helps us
Expand Down
4 changes: 4 additions & 0 deletions Include/internal/pycore_interp.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ extern "C" {
#include "pycore_exceptions.h" // struct _Py_exc_state
#include "pycore_floatobject.h" // struct _Py_float_state
#include "pycore_genobject.h" // struct _Py_async_gen_state
#include "pycore_gil.h" // struct _gil_state
#include "pycore_gc.h" // struct _gc_runtime_state
#include "pycore_list.h" // struct _Py_list_state
#include "pycore_tuple.h" // struct _Py_tuple_state
Expand Down Expand Up @@ -49,6 +50,9 @@ struct _ceval_state {
_Py_atomic_int eval_breaker;
/* Request for dropping the GIL */
_Py_atomic_int gil_drop_request;
/* The GIL */
struct _gil_state gil;
/* Pending calls */
struct _pending_calls pending;
};

Expand Down
2 changes: 0 additions & 2 deletions Include/internal/pycore_runtime.h
Loading