Summary

In this chapter, we explored how to achieve concurrency in Python applications and how it can be useful. During this exploration, we uncovered the capabilities of the Python multithreading module and how it can be used to spawn multiple threads to divide workloads on. We then moved on to understand how to synchronize the actions of those threads and learned about various issues that may crop up in a multithreaded application, if not taken care of. The chapter then moved on to explore the limitations that are imposed by the presence of the global interpreter lock (GIL)in some Python implementations and how it affects multithreaded workloads. To explore possible ways to overcome the restrictions imposed by the GIL, we moved on to understand the use of Python's multiprocessing module and how it can help us to leverage the full potential of a multiprocessor system by achieving parallelism powered by the use of multiple processes instead of multiple threads.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.82.217