def worker(q):
    working = True
    while working:
        x = q.get()
        assert (x < 10)
        q.task_done()
        if (x == (- 1)):
            working = False
def worker(q):
    working = True
    while working:
        x = q.get()
        assert (x < 10)
        q.task_done()
        if (x == (- 1)):
            working = False