'@see: _task_done() documentation
:return: True if the in_queue_size is != 0 OR if one of the pool workers
is still doing something that might impact on out_queue.'

def has_pending_work(self):

    if ((self.in_queue_size() > 0) or (self.out_queue.qsize() > 0)):
        return True
    if (len(self._tasks_in_progress) > 0):
        return True
    if (hasattr(self, '_threadpool') and (self._threadpool is not None)):
        if ((self._threadpool._inqueue.qsize() > 0) or (self._threadpool._outqueue.qsize() > 0)):
            return True
    return False
