@asyncio.coroutine
def queue_put():
    nonlocal finished
    started.set()
    (yield from q.put(1))
    (yield from q.put(2))
    finished = True
@asyncio.coroutine
def queue_put():
    nonlocal finished
    started.set()
    (yield from q.put(1))
    (yield from q.put(2))
    finished = True