valhallasw
public python v1 · immutableq = Queue.Queue()class T (threading.Thread): def run(self): while(True): print q.get()T().start()q.put('blah')how to: (a) make the thread end when the program is done and the queue is empty?it's possible to put several None items on the queue and check for that, but that requires knowledge of the number of threads.. there probably is a better way :)