Loading…

How is multithreading achieved in Python?

A thread is a lightweight process. Multithreading allows the programmer to execute multiple threads in one go. The Global Interpreter Lock ensures that a single thread performs at a given time. A thread holds the GIL and does some work before passing it on to the next thread. This looks like parallel execution, but actually, it is just threading taking turns at the CPU.

Suggest An Answer

No suggestions avaliable!

Latest post from Python Interview Questions

Ask Question