I was studying this example
http://eli.thegreenplace.net/2011/12/27/python-threads-communication-and-stopping/
He used like this
while not self.stoprequest.isSet():
try:
dirname = self.dir_q.get(True, 0.05)
... # do work
except Queue.Empty:
continue
I did n't get why he used block element in dir_q.get(True)
i want to know how the program behave if i use
self.dir_q.get()
Docs say that if we don't give anything then if there is soomething in queue , it will get it othwise it will raise exception.
i think whats problem with that
what the block, and timeout is doing