MCPcopy Create free account
hub / github.com/ActiveState/code / set

Method set

recipes/Python/576576_Thread_Pool/recipe-576576.py:15–21  ·  view source on GitHub ↗
(self, newSize)

Source from the content-addressed store, hash-verified

13 @propertx
14 def size():
15 def set(self, newSize):
16 for i in xrange(newSize-len(self.workers)):
17 new = Worker(self)
18 self.workers.append(new)
19 new.start()
20 for i in xrange(len(self.workers)-newSize):
21 self.jobs.put((None, None, None, None))
22 def get(self):
23 return len(self.workers)
24 return get, set

Callers 15

_set_valueMethod · 0.45
_set_exceptionMethod · 0.45
stopMethod · 0.45
__init__Method · 0.45
moveMethod · 0.45
runMethod · 0.45
handle_messageMethod · 0.45
hide_show_boxMethod · 0.45
recipe-576536.pyFile · 0.45
__init__Method · 0.45
__workerThreadMethod · 0.45
__timerThreadMethod · 0.45

Calls 5

xrangeClass · 0.85
WorkerClass · 0.70
appendMethod · 0.45
startMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected