MCPcopy
hub / github.com/ModelTC/LightLLM / fix_repopulate_pool_static

Function fix_repopulate_pool_static

lightllm/utils/tuning_utils.py:15–26  ·  view source on GitHub ↗
(
    ctx, Process, processes, pool, inqueue, outqueue, initializer, initargs, maxtasksperchild, wrap_exception
)

Source from the content-addressed store, hash-verified

13
14@staticmethod
15def 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
29def run_func(func, args):

Callers

nothing calls this directly

Calls 1

startMethod · 0.80

Tested by

no test coverage detected