~/talk

GIL: What's the hassle and... should I care?

Talkat PyCon SK 2024 · 2024-03-15..03-17· [python]
slides:none on file

Explains that CPython’s Global Interpreter Lock actually protects reference counting and C-level mutable Python structures, and that threads can use multiple cores when extensions release the GIL (for IO or native libraries like NumPy). Describes the CV wake, the gil_drop_request cooperative handoff and why fine‑grained removal is hard. Notes sub interpreters in 3.12 and PEP 703’s compile‑time flag toward an optional GIL. Recommends profiling first, then multiprocessing, C extensions, or Cython/Numba nogil paths for CPU‑bound work.

AI-written summary · about

  1. 0:00Introduction to GIL
  2. 2:59What is the GIL?
  3. 4:00Parallelism vs Concurrency
  4. 7:35Locks and System Calls
  5. 10:11Memory Management in CPython
  6. 14:10How the GIL Works
  7. 17:27GIL Operation Scenarios
  8. 24:39Why the GIL Still Exists
  9. 26:26Attempts to Remove the GIL
  10. 28:15Making GIL Optional
  11. 30:20What to Do in the Meantime
  12. 34:38Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.