Threading Problem

Fredrik Lundh fredrik at
Wed Dec 22 14:23:17 CET 2004

Steve Holden wrote:

> Well, I don't believe there's any guarantee that a thread will get run preference over its 
> starter - they're both threads, after all. Try putting a sleep after th.start() and before the 
> print statement and you should see that the "worker" thread runs while the main thread sleeps.

that's correct, but the "threading" module does a 0.000001-second sleep
to get around this, no matter what thread scheduler you're using.

if you're building threads on top of the lower-level "thread" api, you have
to do that yourself.


More information about the Python-list mailing list