[New-bugs-announce] [issue14487] Add pending() query method to Queue.Queue
report at bugs.python.org
Wed Apr 4 04:23:39 CEST 2012
New submission from Nick Coghlan <ncoghlan at gmail.com>:
The task management API in the Queue module doesn't let you check to see if there are any pending tasks still being processed.
A pending() query API (analagous to empty() and full()) would resolve that problem.
The use case is for a process that terminates when all current jobs are complete, but should immediately start processing any *new* jobs that arrive while waiting for the old ones. Using the current Queue.join() method would fail the second requirement (since the blocking calls means that no new jobs could be added while waiting for the old ones to finish).
title: Add pending() query method to Queue.Queue
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce