[Python-checkins] r61100 - python/trunk/Lib/threading.py

Nick Coghlan ncoghlan at gmail.com
Fri Feb 29 13:52:00 CET 2008


jeffrey.yasskin wrote:
> To be fair, the 10ms isn't CPU time, and other threads including the spawned
> one get to run during it. There are also some slightly more complicated ways to
> get back the .4us in isAlive() if we want.

Would one of those 'slightly more complicated' ways be to keep the old 
boolean flag around and set it to true before signalling the new event 
object?

Then __repr__ and isAlive could just continue to query the boolean flag, 
with the event used only in thread.start()

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org


More information about the Python-checkins mailing list