Re: Working threads progress

2009-10-31 Thread mattia
Il Wed, 28 Oct 2009 20:04:45 -0700, ryles ha scritto: On Oct 28, 7:02 pm, mattia ger...@gmail.com wrote: Now, I would like to know the activity done (e.g. every two seconds) so I create another thread that checks the queue size (using .qsize()). Have you any suggestion to improve the code?

Working threads progress

2009-10-28 Thread mattia
hi all, I have a simple program that uses multiple threads to carry out some work. Every threads share the same queue.Queue() (that is synchronized) in order to get some data and then carry out the work. Suppose I have something like: q = queue.Queue() for x in range(100): q.put(x) then I

Re: Working threads progress

2009-10-28 Thread ryles
On Oct 28, 7:02 pm, mattia ger...@gmail.com wrote: Now, I would like to know the activity done (e.g. every two seconds) so I create another thread that checks the queue size (using .qsize()). Have you any suggestion to improve the code? It's not uncommon to pass each thread a second queue for