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 output, which
in your case might be tuples of (item, result). You can read from this
queue in a single thread, and since the results now accumulate
incrementally, you can easily collect more detailed status/progress
information (if that's what you're looking for).
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to