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

Method test_blocking_put_wait

tornado/test/queues_test.py:213–224  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

211
212 @gen_test
213 def test_blocking_put_wait(self):
214 q = queues.Queue(1) # type: queues.Queue[int]
215 q.put_nowait(0)
216
217 def get_and_discard():
218 q.get()
219
220 self.io_loop.call_later(0.01, get_and_discard)
221 self.io_loop.call_later(0.02, get_and_discard)
222 futures = [q.put(0), q.put(1)]
223 self.assertFalse(any(f.done() for f in futures))
224 yield futures
225
226 @gen_test
227 def test_put_timeout(self):

Callers

nothing calls this directly

Calls 4

put_nowaitMethod · 0.95
putMethod · 0.95
call_laterMethod · 0.80
doneMethod · 0.45

Tested by

no test coverage detected