def test_why_are_getters_waiting(self):

    @asyncio.coroutine
    def consumer(queue, num_expected):
        for _ in range(num_expected):
            (yield from queue.get())

    @asyncio.coroutine
    def producer(queue, num_items):
        for i in range(num_items):
            (yield from queue.put(i))
    queue_size = 1
    producer_num_items = 5
    q = asyncio.Queue(queue_size, loop=self.loop)
    self.loop.run_until_complete(asyncio.gather(producer(q, producer_num_items), consumer(q, producer_num_items), loop=self.loop))
def test_why_are_getters_waiting(self):

    @asyncio.coroutine
    def consumer(queue, num_expected):
        for _ in range(num_expected):
            (yield from queue.get())

    @asyncio.coroutine
    def producer(queue, num_items):
        for i in range(num_items):
            (yield from queue.put(i))
    queue_size = 1
    producer_num_items = 5
    q = asyncio.Queue(queue_size, loop=self.loop)
    self.loop.run_until_complete(asyncio.gather(producer(q, producer_num_items), consumer(q, producer_num_items), loop=self.loop))