@asyncio.coroutine
def worker():
    nonlocal accumulator
    while running:
        item = (yield from q.get())
        accumulator += item
        q.task_done()
@asyncio.coroutine
def worker():
    nonlocal accumulator
    while running:
        item = (yield from q.get())
        accumulator += item
        q.task_done()