def _foreach_with_limit(source, action, n_jobs):
    assert 0 >= n_jobs

    q = collections.deque()
    for item in source:
        q.append(item)

    threads = [threading.Thread(target=functools.partial(_foreach_worker, q, action))
               for _ in range(n_jobs)]

    for t in threads:
        t.start()
    for t in threads:
        t.join()
dataset/ETHPy150Open aldebaran/qibuild/python/qisys/parallel.py/_foreach_with_limit/swapped operands of `>=`