4 ms·
Inside the Python GIL
- jnoller 17y agoAnd for further information: http://jessenoller.com/2009/02/01/python-threads-and-the-global-interpreter-lock/ http://jessenoller.com/2009/02/01/python-threads-and-the-glo... Ultimately, while the implementation of the GIL is inefficient, and does harm you in the case of processor-bound computation, they're still useful in many cases where you're dealing with I/O (file, and socket). Even as the multiprocessing maintainer, I'd like to see a more robust threading model within python - unladen swallow (http://code.google.com/p/unladen-swallow/ http://code.google.com/p/unladen-swallow/) may be able to offer us a world without a GIL soon(ish), but even barring that, getting some work done on improving what we have today would be nice.
- st3fan 17y ago"""•Bias : For parallel computing involving heavy CPU processing, I much prefer message passing and cooperating processes to thread programming""" Of course you prefer it .. you have no choice!
- jnoller 17y agoBaloney. Many of us who do want better threading in python still prefer message passing and processes. That's nothing new. Different tools work well for different jobs.
- nc 17y agoMessage passing and cooperating processes do have a lot of real advantages: - race conditions are almost eliminated - deadlock is more easily avoided - no need for locks
- jnoller 17y agoAlso on blip.tv: http://blip.tv/file/2232410 http://blip.tv/file/2232410