Event set/clear/wait

Gordon McMillan gmcm at hypernet.com
Mon Jul 17 19:29:07 EDT 2000


j vickroy wrote:

>How can software be written to determine when it is "safe" to *clear* a
>threading.Event that has previously been *set*?

>"safe" is intended to convey the notion that all threads issuing a
>*wait* on the event are no-longer blocking because of it.

You don't need to worry about it. All waiting threads are notified while 
the setter holds the lock. Once notified, they don't look to see if the 
Event is set or clear - they're unblocked.

- Gordon



More information about the Python-list mailing list