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

Function engine

recipes/Python/466427_mthreadpy/recipe-466427.py:18–24  ·  view source on GitHub ↗
(threads, seconds)

Source from the content-addressed store, hash-verified

16 print basename(argv[0]), '<threads> <seconds>'
17
18def engine(threads, seconds):
19 print 'Suite starting at', ctime()
20 for thread in range(threads):
21 temp = Thread(target = threadWork)
22 temp.setDaemon(True)
23 temp.start()
24 sleep(seconds)
25
26def threadWork():
27 while True:

Callers 1

mainFunction · 0.70

Calls 4

rangeFunction · 0.85
sleepFunction · 0.85
ThreadClass · 0.50
startMethod · 0.45

Tested by

no test coverage detected