Help: puzzled about threads

Gonçalo Rodrigues op73418 at mail.telepac.pt
Sat Feb 15 23:15:22 CET 2003


On Sat, 15 Feb 2003 22:07:52 +0000, Gonçalo Rodrigues
<op73418 at mail.telepac.pt> wrote:

>On Sat, 15 Feb 2003 23:35:57 +0300, Anton Muhin <antonmuhin at sendmail.ru>
>wrote:
>

[snip]

>>
>>Your thread didn't manage to start:
>
>So I vary my question. Why exactly didn't the thread start?
>
>>if you add the following lines, "sleeping..." won't print
>>     while mockthread.isAlive():
>>         print "Sleeping..."
>>         time.sleep(0.001)
>>
>>But if you add
>>	time.sleep(0.01)
>>before the loop above, everything will be OK.
>
>And why does this solve the problem?

Reply to myself: the script ended before the thread started.

>
>>
>>HTH,
>>Anton.
>
>With my best regards,
>G. Rodrigues

Thanks Anton for putting me on the right track.

With my best regards,
G. Rodrigues





More information about the Python-list mailing list