def _start_new_cycle(self):

        active_workers = self._pool_list.count_active_workers()
        max_new_workers = active_workers - self._max_workers

        pool = _Pool(self._job_list, max_new_workers)

        # schedule currently inactive jobs in the new pool
        all_job_index_set = set(xrange(len(self._job_list)))
        inactive_job_index_set = all_job_index_set - self._active_job_index_set
        for i in inactive_job_index_set:
            pool.add_job_index(i)
            self._active_job_index_set.add(i)
        pool.finish()

        self._pool_list.add_pool(pool)
dataset/ETHPy150Open bloomberg/phabricator-tools/py/phl/phlmp_cyclingpool.py/CyclingPool._start_new_cycle/swapped operands of `-`