[Python-ideas] Simpler thread synchronization using "Sticky Condition"
richard.whitehead at ieee.org
Wed Mar 27 05:43:45 EDT 2019
Thank you everyone who has commented on this issue, I've been overwhelmed by the helpfulness and thoughtfulness of the responses.
* Condition variables work without problems provided you use them correctly, but using them correctly is quite tricky.
* Using an event to achieve the same thing is trivially easy.
* Having the event auto-resetting isn't even necessary.
* The very simplest client code, which is almost impossible to get wrong or for someone else to mess up during maintenance, uses an auto-resetting event, and so that's what I'm going to do.
* It doesn't sound like there is any appetite for this auto-reset-event to be part of the Python standard library, so I'm not going to push for a PEP to be raised on it, but I will certainly use it in my company's base library code.
More information about the Python-ideas