Problem with threads in python????????

Manikandan R mani.agape at gmail.com
Mon Feb 25 10:08:49 EST 2008


Hai,

          Is it possible to share a single variable between multiple
threads. For eg:

Class A:
         thread_init()

       def run():
              fun1()

def fun():
 ........ assume some arithmatic operation is going on according to the
input given and each fun will *give different output*
.........

count = 10
while count:
         call the class which will call the thread,
         count--

now call   list.join()

Now 10 Thread will be running and each thread will have there individual
output.

       Here is the problem now i want the sum of output of all the function.
How can i do this ??? Can any one give me some idea. With example. Quite
urgent help me please...

Thank's and Regard's,
R.Manikandan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080225/2938f44c/attachment.html>


More information about the Python-list mailing list