Tim Peters added the comment:

I can't judge a use case for a thread gimmick in the absence of wholly 
specified examples.  There are too many possible subtleties.  Indeed, if I'd do 
anything with Event.clear() it would be to remove it - I've seen too much code 
that suffers subtle race bugs when trying to reset an event.  The one thing 
it's clearly good for is announcing a one-time global state change, for which 
it's sufficient, efficient, clear, and hard to get wrong.

Can you use a Barrier instead?  The Barrier design allows reuse with no special 
care, Barrier.wait() already returns a little integer unique to each thread, 
and the Barrier constructor even allows a function to be passed in to be 
executed by (exactly) one of the threads when the Barrier is complete.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29449>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to