Need some assistance with Python threading/queue

后端 未结 3 631
梦毁少年i
梦毁少年i 2021-02-09 10:26
import threading
import Queue
import urllib2
import time

class ThreadURL(threading.Thread):

    def __init__(self, queue):
        threading.Thread.__init__(self)

            


        
3条回答
  •  故里飘歌
    2021-02-09 10:29

    One thing, in the thread run function, the while True loop, if some exception happened, the task_done() may not be called however the get() has already been called. Thus the queue.join() may never end.

提交回复
热议问题