Eric is the Editorial Manager at DZone, Inc. Feel free to contact him at egenesky@dzone.com Eric has posted 804 posts at DZone. You can read more from them at their website. View Full User Profile

PyPy Team Trying to Go Multicore

01.16.2012
| 4390 views |
  • submit to reddit
The PyPy team has updated their progress on getting rid of the infamous Global Interpreter Lock in Python.  According to their previous post, the team was attempting to approach the problem using Software Transactional Memory, a relatively recent development in computer science.  So far, the lock has been removed in Jython, but this is more of a problem in CPython.  According to the PyPy team:

The reason that it has not been done in CPython so far is that it's even more work: we would need to care not only about carefully adding fine-grained locks everywhere, but also about reference counting; and there are a lot more C extension modules that would need care, too. And we don't have locking primitives as performant as Java's, which have been hand-tuned since ages (e.g. to use help from the JIT compiler).

One commenter recognized that approaching this problem using Transactional Memory...

. . . is much, much harder to get right than it looks like in today effectful/imperative languages. Sure, it looks wonderful on paper, but if your language doesn't help you control side-effects it will give you a very hard time. -- gasche

Still, the PyPy team is suggesting that they have a plan for Python developers to use all their cores without ever having to write threads.  You can follow further developments and details on the project at the PyPy Status blog.
Published at DZone with permission of its author, Eric Genesky.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)