global interpreter lock

Piet van Oostrum piet at cs.uu.nl
Sat Aug 27 14:37:31 EDT 2005


>>>>> Paul Rubin <http://phr.cx@NOSPAM.invalid> (PR) wrote:

>PR> zen19725 at zen.co.uk (phil hunt) writes:
>>> >Let's see. Reality is that writing correct programs is hard. Writing
>>> >correct programs that use concurrency is even harder, because of the
>>> >exponential explosion of the order that operations can happen
>>> >in. Personally, I'm willing to use anything I can find that makes
>>> >those tasks easier.
>>> 
>>> Indeed so. Use threading (or whatever) when one has to, use an 
>>> asynchronous single-threaded process whenever you can.

>PR> This is silly.  You could say the exact same thing about if
>PR> statements.  The number of paths through the program is exponential in
>PR> the number of if statements executed.  So we better get rid of if
>PR> statements.

>PR> Really, the essence of programming is to find ways of organizing the
>PR> program to stay reliable and maintainable in the face of that
>PR> combinatorial explosion.  That means facing the problem and finding
>PR> solutions, not running away.  The principle is no different for
>PR> threads than it is for if statements.

The principle is (more or less) similar, but for parallel programs it is an
order of magnitude more complicated. Compare the correctness proofs of
parallel programs with those of sequential programs.
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org



More information about the Python-list mailing list