Lets Talk About GIL

AMiT Kumar (~aktech)




I will be talking about Global-Interpreter-Lock (GIL) [1] in Python. It's a mutex that prevents multiple native threads from running in parallel. In essence, this says that a python program cannot do more than one thing at once via threading [3].

There is lot of misconception in majority of Python Programmers regarding Global Interpreter Lock. Most of them think its the worst part of Python. I will try to demonstrate how it actually works and how we can leverage multiple CPU cores for multithreading for I/O and CPU Bound tasks. I will also show some comparisons with different implementations of Python and the presence or absence of GIL in those, to answer questions like, why we can't just remove it from CPython and solve all our problems or why Jython performs better in Multithreading for CPU Bound task.


  • Whats a Process?
  • Whats a Thread?
  • Multithreading
  • Why Multithreading?
  • Multithreading in Python
  • Threading Module in Python (Thread Class, functions as thread)
  • Why Sequential execution is Faster than multithreaded one? (In an Example)
  • Global Interpreter Lock
  • I/O Bound and CPU Bound Processes
  • GIL Behaiviour on these two types of Process
  • Tick?
  • Guido On GIL
  • The Famous GIL Removal Patch
  • Multithreading in Other Python Implementations
  • What's next?

Speaker Info:

Amit is a Software Development Engineer at Zomato's Machine Learning Team. He is also a core developer of SymPy Library. He is a programmer, learner, presenter and a Software Engineer in the process. He has spoken at various national and international conferences and local meetups. You may find him with handle @aktech on the Web.

Speaker Links:

Section: Core Python
Type: Talks
Target Audience: Advanced
Last Updated:

Will love to discuss on GIL :)

Harshul jain (~harshul1610)

Hi! Could you please add up slides to your workshop/talk?

Shivani Bhardwaj (~shivan1b)

Prior experience? Links to previous talks ... ?

Akshay Arora (~akshayaurora)

Hi Akshay, thanks for the comment. The ref [8] links all of my previous talks.

AMiT Kumar (~aktech)

@Shivani, I have mentioned a basic outline of the talk, will try to add slides soon.

AMiT Kumar (~aktech)

anyone says that i have a present for languages, and i myself experience reading them. but, i am now not positive whether or not I need to take a look at modern-day languages at university level, Do My Essay For Me because I do not even understand what careers i will get with a contemporary languages diploma, aside from translating, deciphering and coaching; the first sound tremendously dull, and as for the 0.33 one,

Elizabeth Harville (~elizabeth)

GIL is a mutex that prevents multiple native threads from running in parallel. IP address


GIL is a mutex that prevents multiple native threads from running in parallel. IP address


Login to add a new comment.