[Python-Dev] Making python C-API thread safe (try 2)
Harri Pesonen
fuerte at sci.fi
Tue Sep 16 23:22:19 EDT 2003
Jeff Epler wrote:
>On Tue, Sep 16, 2003 at 08:22:41PM +0300, Harri Pesonen wrote:
>
>
>>It is more efficient to have one process and several threads, than
>>several processes each having one thread.
>>
>>
>
>If it's easier to code "several processes each having one thread", then
>I'll sure do it. I've accepted a 2x-100x speed hit by using Python, so
>if it's a 25% difference in efficiency, I won't sign up to wait for code
>that doesn't exist yet.
>
>
But wouldn't it be better if Python had real multitasking? Comments like
the above mean that you accept Python as it is, fine. But usually people
want to make things better when they see that something can be improved.
If my roof is leaking, I have two choices: fix it or accept it. If I am
able to fix it, then I'll probably do it.
The old code base really is the problem here. If Python threads really
run at the same time in the future, how many current applications stop
working because they depend on the fact that only one thread runs at any
given time, and do not acquire and release locks as needed? On the other
hand, my suggestion probably means that we couldn't have a threading
module compatible with thread or threading anyhow (we could have
freethreading, with specific functions for inter-thread communication).
Harri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20030917/135d3b03/attachment.html>
More information about the Python-list
mailing list