STINNER Victor added the comment: _run_once() can be called more than expected if selector.select() was interrupted by a signal or because the granularity is wrong. If we want to avoid that, a simple fix is just to loop again in this case. Attached patch implements that (I wrote it for Tulip, it cannot applied cleanly on Python because I added debug code to investigate this issue).
The patch should also fix the sporadic issue of signal interrupting _run_once(). The unit test should not be interrupted by a signal, but it can occur on a real application. For example when your resize a terminal. ---------- keywords: +patch Added file: http://bugs.python.org/file33821/loop_run_once.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20452> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com