def test_why_are_putters_waiting(self):
    queue = asyncio.Queue(2, loop=self.loop)

    @asyncio.coroutine
    def putter(item):
        (yield from queue.put(item))

    @asyncio.coroutine
    def getter():
        (yield)
        num = queue.qsize()
        for _ in range(num):
            queue.get_nowait()
    t0 = putter(0)
    t1 = putter(1)
    t2 = putter(2)
    t3 = putter(3)
    self.loop.run_until_complete(asyncio.gather(getter(), t0, t1, t2, t3, loop=self.loop))
def test_why_are_putters_waiting(self):
    queue = asyncio.Queue(2, loop=self.loop)

    @asyncio.coroutine
    def putter(item):
        (yield from queue.put(item))

    @asyncio.coroutine
    def getter():
        (yield)
        num = queue.qsize()
        for _ in range(num):
            queue.get_nowait()
    t0 = putter(0)
    t1 = putter(1)
    t2 = putter(2)
    t3 = putter(3)
    self.loop.run_until_complete(asyncio.gather(getter(), t0, t1, t2, t3, loop=self.loop))