Vilnis Termanis added the comment: A few additional notes:
1) On an AMD E-450 under Ubuntu 14.04 x64 with a current in-development build, when running condition_test.py, Condition.notify_all() takes (measure using time.clock) 0.0003 with the patch and 0.3219 without it. Additionally the in-script timeit calls seem to suggest that the patch does not adversely affect Condition.wait(). 2) Unit tests have also been run against test_multiprocessing_forkserver (typo in original message). 3) A scenario where this might become apparent would be to have many worker processes which have a loop along the lines of: while not event.is_set(): do_more_work() # Pause because the task is only supposed to happen every X seconds # or a wait is in effect due to an error. Do not want to use # time.sleep so loop is exited promptly rather than blindly sleeping. event.wait(some_amount) other_work_or_shutdown() If many processes call event.wait() with a timeout and the event is not set often (e.g. since it's a shutdown flag), a long-running program with many worker processes can end up having event.set() take a considerable amount of time. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25469> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com