MCPcopy Create free account
hub / github.com/defold/defold / __init__

Method __init__

scripts/build.py:509–516  ·  view source on GitHub ↗
(self, worker_count)

Source from the content-addressed store, hash-verified

507
508class ThreadPool(object):
509 def __init__(self, worker_count):
510 self.workers = []
511 self.work_queue = Queue()
512
513 for _ in range(worker_count):
514 w = Thread(target = self.worker, daemon=True)
515 w.start()
516 self.workers.append(w)
517
518 def worker(self):
519 func, args, future = self.work_queue.get()

Callers

nothing calls this directly

Calls 4

QueueClass · 0.90
ThreadFunction · 0.85
appendMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected