[issue12338] multiprocessing.util._eintr_retry doen't recalculate timeouts
Richard Oudkerk shibt...@gmail.com added the comment: _eintr_retry was removed by 99ef4501205b. -- resolution: - out of date stage: - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12338 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12338] multiprocessing.util._eintr_retry doen't recalculate timeouts
STINNER Victor victor.stin...@gmail.com added the comment: SocketServer has been changed to restart select() on EINTR, but it doesn't recompute the timeout. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12338 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12338] multiprocessing.util._eintr_retry doen't recalculate timeouts
STINNER Victor victor.stin...@gmail.com added the comment: SocketServer has been changed to restart select() on EINTR, but it doesn't recompute the timeout. See issue #7978. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12338 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12338] multiprocessing.util._eintr_retry doen't recalculate timeouts
Antoine Pitrou pit...@free.fr added the comment: Note that socketserver's timeout is not really important: it's just used for a polling loop, with a default of 0.5 seconds. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12338 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12338] multiprocessing.util._eintr_retry doen't recalculate timeouts
sbt shibt...@gmail.com added the comment: _eintr_retry is currently unused. The attached patch removes it. If it is retained then we should at least add a warning that it does not recalculate timeouts. -- keywords: +patch Added file: http://bugs.python.org/file24888/mp_remove_eintr_retry.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12338 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12338] multiprocessing.util._eintr_retry doen't recalculate timeouts
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12338 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12338] multiprocessing.util._eintr_retry doen't recalculate timeouts
STINNER Victor victor.stin...@haypocalc.com added the comment: subprocess._communicate_with_select() retries select.select() on EINTR: it recomputes timeout before each call. while self._read_set or self._write_set: timeout = self._remaining_time(endtime) if timeout is not None and timeout 0: raise TimeoutExpired(self.args, orig_timeout) try: (rlist, wlist, xlist) = \ select.select(self._read_set, self._write_set, [], timeout) except select.error as e: if e.args[0] == errno.EINTR: continue raise ... It has a similar code for select.poll(). asyncore.poll() handles EINTR: it just returns. I think it would be better to just implement the retrying version of select directly. It would be nice to share more code between subprocess and multiprocessing, but I don't know where such code should be moved. Create a new module just for one function is stupid. Handling EINTR is a common problem when managing subprocesses. subprocess has a _eintr_retry_call() function. multiprocessing has a @_eintr_retry decorator handling supporting more error types (use except (EnvironmentError, select.error):). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12338 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12338] multiprocessing.util._eintr_retry doen't recalculate timeouts
New submission from sbt shibt...@gmail.com: multiprocessing.util._eintr_retry is only used to wrap select.select, but it fails to recalculate timeouts. Also, it will never retry the function it wraps because of a missing import errno. I think it would be better to just implement the retrying version of select directly. -- messages: 138364 nosy: sbt priority: normal severity: normal status: open title: multiprocessing.util._eintr_retry doen't recalculate timeouts ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12338 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com