Conditions vs Events

Carl J. Van Arsdall cvanarsdall at mvista.com
Wed Apr 19 18:57:01 EDT 2006


Le Monde De Python,

I've been working a lot with python threads from the threading module.  
Specifically, when is it better to use a condition object vs an event 
object?

It seems to me that, at least superficially, I can just about use these 
two mechanisms interchangeably.  The only real difference I can see is 
that I can call isSet() on an event in the case that an event is 
triggered before wait() is called.  Are there any differences? 

Also, does calling wait reset some type of "notify" in a condition 
object like it does in an event object?


Anyhow, thanks for your help!

-carl





-- 

Carl J. Van Arsdall
cvanarsdall at mvista.com
Build and Release
MontaVista Software




More information about the Python-list mailing list