| 13 | |
| 14 | @staticmethod |
| 15 | def fix_repopulate_pool_static( |
| 16 | ctx, Process, processes, pool, inqueue, outqueue, initializer, initargs, maxtasksperchild, wrap_exception |
| 17 | ): |
| 18 | for i in range(processes - len(pool)): |
| 19 | w = Process( |
| 20 | ctx, target=worker, args=(inqueue, outqueue, initializer, initargs, maxtasksperchild, wrap_exception) |
| 21 | ) |
| 22 | w.name = w.name.replace("Process", "PoolWorker") |
| 23 | w.daemon = False # modify to False |
| 24 | w.start() |
| 25 | pool.append(w) |
| 26 | util.debug("added worker") |
| 27 | |
| 28 | |
| 29 | def run_func(func, args): |