MCPcopy Create free account
hub / github.com/EasyIME/PIME / produce

Method produce

python/python3/tornado/test/iostream_test.py:687–695  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

685
686 @gen.coroutine
687 def produce():
688 remaining = nbytes
689 while remaining > 0:
690 size = r.randint(1, min(1000, remaining))
691 data = os.urandom(size)
692 produce_hash.update(data)
693 yield ws.write(data)
694 remaining -= size
695 assert remaining == 0
696
697 @gen.coroutine
698 def consume():

Callers

nothing calls this directly

Calls 2

updateMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected