how does a queue stop the thread?

2010-04-21 Thread kaiix
A simple thread pool example. My question is, since *MyThread.run* will loop endless, how does the thread know the time to quit? how does the *queue* notify the thread? is there any shared variables, like a *lock*? When I set daemon false, it stays in the loop, not quit any more. what's the role d

Re: how does a queue stop the thread?

2010-04-21 Thread kaiix
@kushal, thanks for your replies. before i wrote the email, i've already read the python docs carefully. i need the proof from code, i mean python source code. i tried to prove some of my assumptions that lead the loop quit, and i traced back to Queue.py, threading.py, dummy_thread.py, now i need