Summary
While the GIL in Python offers a simple and intuitive solution to one of the more difficult problems in the language, it also raises a number of problems of its own, concerning the ability to run multiple threads in a Python program to process CPU-bound tasks. Multiple attempts have been made to remove the GIL from the main implementation of Python, but none has been able to achieve it while maintaining the effectiveness of processing non-CPU-bound tasks, which are affected by the GIL.
Overall, we have discussed practical methods that make working with the GIL easier. We have also learned that while it possesses considerable notoriety among the Python community, the GIL only affects a certain portion of the ecosystem. This should better inform our opinion about the GIL.
In the last four chapters, we discussed some of the most well-known and common problems in concurrent programming in Python. For the remainder of the book, we will be looking at a different topic—...