[pypy-dev] Thinking about the GIL

Benjamin Peterson benjamin at python.org
Mon Mar 14 20:12:35 CET 2011

2011/3/14 Timothy Baldridge <tbaldridge at gmail.com>:
> I guess I'm missing something, but what's wrong with simply ripping
> out the GIL? In C# we have threads, C FFI (via PInvoke), and never
> have any major issues with threading. It seems to me that the GIL is
> only needed because assumptions were made when writing the
> interpreter. I don't know if it's full of global variables or
> something, but can anyone explain why a GIL is needed at all? I've
> done quite a bit of multi-threading programming, and I fail to see the
> need for a GIL.

Many reasons. The biggest being python data structures aren't thread-safe.


More information about the Pypy-dev mailing list