Question about thread

Valkyrie valkyrie at cuhk.edu.hk
Fri Nov 19 11:41:39 EST 2004


Thank you for your advice. I have quite seriously searched for it in fact, but
just without the luck on finding such article...

Craig Ringer wrote:
> On Fri, 2004-11-19 at 23:45, Valkyrie wrote:
> 
>>When I do it line by line in python's console, I have similar result to youl.
>>But when I try to run it in a file, say:
>>
>>python demo.py
>>
>>It just returns me nothing. I have no idea on this right now...
> 
> 
> You need to cause the main thread to wait on the child threads until
> they've all finished, otherwise - as Peter Hickman just mentioned - your
> script will terminate and all threads will end. Ten seconds on Google
> found this:
> 
> http://www.faqts.com/knowledge_base/view.phtml/aid/1364
> 
> --
> Craig Ringer
> 



More information about the Python-list mailing list