Wednesday, March 25, 2009

Great article about the Python GIL

I just stumbled upon this article about the Global Interpreter Lock in Python by Jesse Noller.

I was benchmarking my Stackless Python execution environment to see whether it was actually able to utilize my multi-core CPU fully - and it wasn't... In it I spawn a thread per CPU core and thus maintain separate stackless schedulers so that I may schedule multiple tasklets for execution at the same time - or so I thought :-)

The article by Jesse Noller is very nice, and I suggest that anyone interested in using threading in Python to do heavy lifting should read it. If you are using threads solely to get more responsiveness when doing blocking I/O calls there is no need to read it; just continue doing what it is you are doing ;-)

No comments:

Post a Comment