MCPcopy
hub / github.com/tornadoweb/tornado / worker

Method worker

tornado/test/queues_test.py:326–331  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

324
325 @gen.coroutine
326 def worker():
327 while True:
328 item = yield q.get()
329 self.accumulator += item
330 q.task_done()
331 yield gen.sleep(random() * 0.01)
332
333 # Two coroutines share work.
334 worker()

Callers

nothing calls this directly

Calls 2

task_doneMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected