Threading.Event w/ timeout veeeeeery slow on win32?

chris liechti cliechti at
Wed Jul 11 22:41:58 CEST 2001

what is the timeout value?
i've had problems with time.sleep() when using values smaller than 20ms 
(0.02). I'm now using 30ms wich works fine.

it seems that windows has a time resulution of 10ms or worse...

(details: when i ran the old code with time.sleep(0.01) the program got 
very slow and the win NT4.0 taskmanager told that [File] Explorer is 
getting 30% of CPU power. this number must be totaly wrong because its an 
other process and my programm does not use files or any other things that 
would require the Explorer. moral: don't count on windows if it get near 
10ms )

cliechti at

Ville Vainio <vvainio at> wrote in 
news:yoxr8vnaokt.fsf at

> I'm using a Threading.Event object. When I specify a timeout for
> wait(), it takes almost 1 second for the thread that is wait()'ing to
> wake up when I kick the Event obj with a set(). I know I could get
> around this by creating a thread to perform set()'s periodically, but
> since this slowness is not mentioned in the documentation I was
> wondering whether I have misunderstood something.
> I'm using Python 2.1.

More information about the Python-list mailing list