def queue_as_list(queue):
    """
    Get all the items in the queue as a `list` without removing them.
    
    Note: This was designed for `Queue.Queue`. Don't try to use this, for
    example, on `multiprocessing.Queue`.
    """
    with queue.mutex:
        return list(queue.queue)
