def grow(self, amount):
        if self.max > 0:
            budget = max(self.max - len(self._threads), 0)
        else:
            # self.max <= 0 indicates no maximum
            budget = float('inf')

        n_new = min(amount, budget)

        workers = [self._spawn_worker() for i in range(n_new)]
        while not all(worker.ready for worker in workers):
            time.sleep(.1)
        self._threads.extend(workers)
* Register house (case type = house, basic)
dataset/ETHPy150Open timonwong/OmniMarkupPreviewer/OmniMarkupLib/libs/cherrypy/wsgiserver/wsgiserver3.py/ThreadPool.grow--crossover with--dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/app_manager/tests/test_case_list_form.py/CaseListFormSuiteTests.test_case_list_form_parent_child_submodule_mixed