Limitations with classic python threads

One of the main problems with the classic implementation of Python threads is that their execution is not completely asynchronous. It's known that the execution of python threads is not completely parallel and adding multiple threads often multiplies the execution times. Therefore, performing these tasks reduces the time of execution.

The execution of the threads in Python is controlled by the GIL (Global Interpreter Lock) so that only one thread can be executed at the same time, independently of the number of processors with which the machine counts.

This makes it possible to write C extensions for Python much more easily, but it has the disadvantage of limiting performance a lot, so in spite of everything, ...

Get Mastering Python for Networking and Security now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.