def METHOD_NAME(self, timeout):
    """
    implementation of Queue.join which takes a 'timeout' argument
    returns true on success, false on timeout
    """
    deadline = time() + timeout
    queue = self._queue
    queue.all_tasks_done.acquire()
    try:
        while queue.unfinished_tasks:
            delay = deadline - time()
            if delay <= 0:
                # timed out
                return False
            queue.all_tasks_done.wait(timeout=delay)
        return True
    finally:
        queue.all_tasks_done.release()