Over a million developers have joined DZone.

PyPy Team Trying to Go Multicore

DZone's Guide to

PyPy Team Trying to Go Multicore

· Web Dev Zone
Free Resource

Never build auth again! Okta makes it simple to implement authentication, authorization, MFA and more in minutes. Try the free developer API today! 

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.

Launch your application faster with Okta’s user management API. Register today for the free forever developer edition!


Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}