Article 69ASJ Is It Finally Time to Remove the Python GIL?

Is It Finally Time to Remove the Python GIL?

by
hubie
from SoylentNews on (#69ASJ)

upstart writes:

The global interpreter lock is both a key component of the Python runtime and a major obstacle to multithreading:

Powerful, flexible, and programmer-friendly, Python is widely used for everything from web development to machine learning. By the two most-cited measures, Python has even surpassed the likes of Java and C to become the most popular programming language of all. After years of soaring popularity, Python might well seem unstoppable.

But Python faces at least one big obstacle to its future growth as a programming language. It's called the GIL, the global interpreter lock, and Python developers have been trying to remove it from the default implementation of Python for decades now.

Although the GIL serves a critical purpose, namely ensuring thread safety, it also creates a serious bottleneck for multithreaded programs. In short, the GIL prevents Python from taking full advantage of multiprocessor systems. For Python to be a first-class language for concurrent programming, many believe the GIL has to go.

[...] Strictly speaking, the global interpreter lock isn't part of Python in the abstract. It's a component of the most commonly used Python implementation, CPython, which is maintained by the Python Software Foundation.

[...] What makes the GIL such a problem? For one, it prevents true multithreading in the CPython interpreter. That makes a whole class of code accelerations-optimizations that are readily available in other programming languages-far harder to implement in Python.

Read more of this story at SoylentNews.

External Content
Source RSS or Atom Feed
Feed Location https://soylentnews.org/index.rss
Feed Title SoylentNews
Feed Link https://soylentnews.org/
Feed Copyright Copyright 2014, SoylentNews
Reply 0 comments