Help doing simple threading
Aahz Maruch
aahz at panix.com
Wed Mar 14 00:10:37 EST 2001
In article <3AAEF93E.F817D852 at theworld.com>,
David Lees <deblNonOspammy at theworld.com> wrote:
>
>I am trying to learn how to use threads. I want multiple threads to be
>able to communicate. I thought that threads started by a common process
>would share globals in that module. I want thread to be able to store
>results in a common array. However the following returns all zeros, so
>clearly I am not passing anything back to the top level list 'z'. Can
>someone tell me how I should be passing things back from threads?
Um. No offense, but I think you'd find it more productive if you learn
a bit more about Python before trying to use threads. For example,
"global" has no effect at the module level.
--
--- Aahz <*> (Copyright 2001 by aahz at pobox.com)
Androgynous poly kinky vanilla queer het Pythonista http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6
Python:
Programming the way
Guido indented it
More information about the Python-list
mailing list