A little threading problem

Alban Hertroys alban at magproductions.nl
Wed Dec 1 16:11:24 CET 2004


Hello all,

I need your wisdom again. I'm working on a multi-threaded application 
that handles multiple data sources in small batches each time. The idea 
is that there are 3 threads that run simultaneously, each read a fixed 
number of records, and then they wait for eachother. After that the main 
thread does some processing, and the threads are allowed to continue 
reading data.

I summarized this part of the application in the attached python script, 
which locks up rather early, for reasons that I don't understand (I 
don't have a computer science education), and I'm pretty sure the 
problem is related to what I'm trying to fix in my application. Can 
anybody explain what's happening (Or maybe even show me a better way of 
doing this)?

Regards,

Alban Hertroys,
MAG Productions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multithreading.py
Type: text/x-python
Size: 2037 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20041201/9f74a489/attachment.py>


More information about the Python-list mailing list