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

Function demo

recipes/Python/577505_Command_Threads/recipe-577505.py:116–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

114 return not self._queue.empty()
115
116def demo():
117 def exampleTask():
118 print 'job beginning...'
119 time.sleep(2)
120 print 'job finishing...'
121 cmdObj = CmdThread()
122 for i in xrange(5):
123 cmdObj.addCmd(exampleTask)
124 return cmdObj
125
126if __name__=='__main__':
127 cmd = demo()

Callers 1

recipe-577505.pyFile · 0.70

Calls 3

addCmdMethod · 0.95
CmdThreadClass · 0.85
xrangeClass · 0.85

Tested by

no test coverage detected