[Python-Dev] Making python C-API thread safe (try 2)
jepler at unpythonic.net
Tue Sep 16 23:53:53 CEST 2003
On Wed, Sep 17, 2003 at 12:31:45AM +0300, Christos TZOTZIOY Georgiou wrote:
> On Tue, 16 Sep 2003 20:22:41 +0300, rumours say that Harri Pesonen
> <fuerte at sci.fi> might have written:
> [snip description of alternative python multithreading mechanisms
> allowing riddance of the GIL]
> >It is more efficient to have one process and several threads, than
> >several processes each having one thread.
> Please define 'efficient' as used in your statement.
I hear that on Windows, processes are very inefficient compared to
threads. However, I have no idea what this actually means. Does Harri?
Or is he thinking of something else? Is he thinking of something like
the "higher context switching cost in terms of TLB misses"? God help
anybody who lets thoughts about TLB misses guide the way he writes
Python code! (excepting maybe Tim Peters and anybody writing
I suspect that on Windows, stuff like pipe/dup2/fork has been turned
into a hopelessly complicated mess, rather than something I could "roll
my own" Python object-passing system out of inside an hour (using pickle
or the like).
Another cool thing about the pipe approach is that you can probably
distribute the processing over a network with only a little more work...
wowee, that's cool.
More information about the Python-list