def METHOD_NAME():
    """
    Check if a request pool executes all added requests.
    """
    # threadsafe way to count how many requests ran
    import itertools
    result_counter = itertools.count()
    def increase_counter():
        time.sleep(0.001)
        next(result_counter)
    pool = RequestPool()
    for _ in range(500):
        pool.add(Request(increase_counter))
    pool.wait()
    assert next(result_counter) == 500, "RequestPool has not run all submitted requests: {} out of 500".format(
        next(result_counter) - 1
    )