@asyncio.coroutine
def queue_get():
    nonlocal finished
    started.set()
    res = (yield from q.get())
    finished = True
    return res
@asyncio.coroutine
def queue_get():
    nonlocal finished
    started.set()
    res = (yield from q.get())
    finished = True
    return res