[docs] [bug] bug in example code of queue

? ?? selah at outlook.com
Wed Apr 18 06:19:25 EDT 2018


https://docs.python.org/3.5/library/queue.html
This function will cause q.join() block forever.
```

def worker():

    while True:

        item = q.get()

        if item is None:

++          q.task_done()

            break

        do_work(item)

        q.task_done()
```
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20180418/a6775095/attachment.html>


More information about the docs mailing list