GIL: Everything You Wanted to Know and Were Afraid to Ask
summary
Explains how Python's Global Interpreter Lock (GIL) works, when execution switches between threads, and the performance costs of operating with the GIL (both on and off thread-switches). Covers guidance for C-extension developers on whether to hold or release the GIL, embedding Python in larger applications, low-level (near-assembly) examples, and the GIL's evolution across Python versions.
AI-written summary · about
chapters (10)
- 0:00GIL introduction
- 1:18GIL origin and purpose
- 6:39Python 2.7 evolution
- 11:11GIL behavior in threads
- 15:03GIL release in modules
- 17:10Python 3.6 changes
- 20:26GIL performance impact
- 22:12Practical cases and limits
- 24:44GIL removal projects
- 26:50Conclusion and Q&A
related talks
32mGIL - What it is and how to fight it
29mPython's Infamous GIL
43mGIL: What's the hassle and... should I care?
31mGetting Around the GIL: Parallelizing Python for Better Performance
38mDemystifying the GIL
30mA Per-Interpreter GIL: Concurrency and Parallelism with Subinterpreters
30mFree threaded Python past, present and future
29mTrying No GIL on Scientific Programming
