I want to be able to join() the Queue class but timeouting after some time if the call hasn\'t returned yet. What is the best way to do it? Is it possible to do it by subcla
The join() method is all about waiting for all the tasks to be done. If you don't care whether the tasks have actually finished, you can periodically poll the unfinished task count:
stop = time() + timeout
while q.unfinished_tasks and time() < stop:
sleep(1)
This loop will exist either when the tasks are done or when the timeout period has elapsed.
Raymond