New submission from R. David Murray <rdmur...@bitdance.com>: The documentation for Event.wait says:
This method returns the internal flag on exit, so it will always return True except if a timeout is given and the operation times out. In fact, however, if the thread that sets the flag immediately clears it, wait will return False. Antoine looking at the code says that this appears to be intentional, and that would make sense since originally wait returned no value. My use case is one thread waiting on another to complete a work loop. Normally the worker thread goes to sleep after clearing the flag, but sometimes it immediately starts a new work loop. In either case I want the monitoring loop to take an action when the work loop completes, and raise an error if the wait times out. It looked to me like Event.wait would work in the scenario. ---------- assignee: docs@python components: Documentation messages: 148604 nosy: docs@python, pitrou, r.david.murray, tim_one priority: normal severity: normal stage: needs patch status: open title: Documentation for Event.wait return value is either wrong or incomplete type: behavior versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13502> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com