a very newbie question about threading

Jeremy Bowers jerf at jerf.org
Sat Nov 13 20:49:42 EST 2004


On Fri, 12 Nov 2004 23:01:37 -0500, Peter Hansen wrote:
> Python makes writing threaded code much more straightforward than many
> languages, and also provides some protection from some types of bugs which
> are almost ubiquitous in threaded applications in some other languages. 
> By sticking with the Queue object (see the module by that name) as the
> sole means of communication between threads, the vast majority of other
> thread-related problems simply disappears.  Not all of them -- and
> Jeremy's caution about threads giving even expert programmers pause
> applies -- but in general Python's not a bad place to learn and use
> threads...

I've been looking over the recently announced "Candygram" module, too, and
while I must admit I haven't used it it does look **very** nice and I
think I will next time it makes sense.

http://candygram.sourceforge.net/

Took me a little bit to figure out exactly how to ask a foreign thread for
a value synchronously but the sample program "program_5.2.py" shows how
(and the _alt program does it in Python better). This makes more sense if
you read along in the Erlang book as suggested.




More information about the Python-list mailing list