Help: puzzled about threads

Jp Calderone exarkun at intarweb.us
Sun Feb 16 05:34:00 CET 2003


On Sat, Feb 15, 2003 at 10:07:52PM +0000, Gon?alo Rodrigues 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?
>

  Welcome to the world of race conditions.

  Jp

-- 
 up 7 days, 8:28, 2 users, load average: 0.07, 0.04, 0.00
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20030215/1cb048e2/attachment.pgp>


More information about the Python-list mailing list