mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
Issue #14753: Make multiprocessing treat negative timeouts as it did in 3.2
In Python 3.2 and earlier, Process.join() and Connection.poll() treated negative timeouts as zero timeouts. Earlier versions from the 3.3 line of development treat them as infinite timeouts. The patch reverts to the old behaviour.
This commit is contained in:
parent
ca5f91b888
commit
59d5404bc7
6 changed files with 42 additions and 43 deletions
|
@ -295,18 +295,3 @@ class ForkAwareLocal(threading.local):
|
|||
register_after_fork(self, lambda obj : obj.__dict__.clear())
|
||||
def __reduce__(self):
|
||||
return type(self), ()
|
||||
|
||||
|
||||
#
|
||||
# Automatic retry after EINTR
|
||||
#
|
||||
|
||||
def _eintr_retry(func):
|
||||
@functools.wraps(func)
|
||||
def wrapped(*args, **kwargs):
|
||||
while True:
|
||||
try:
|
||||
return func(*args, **kwargs)
|
||||
except InterruptedError:
|
||||
continue
|
||||
return wrapped
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue