mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +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
|
@ -23,8 +23,7 @@ import itertools
|
|||
|
||||
import _multiprocessing
|
||||
from multiprocessing import current_process, AuthenticationError, BufferTooShort
|
||||
from multiprocessing.util import (
|
||||
get_temp_dir, Finalize, sub_debug, debug, _eintr_retry)
|
||||
from multiprocessing.util import get_temp_dir, Finalize, sub_debug, debug
|
||||
from multiprocessing.forking import ForkingPickler
|
||||
try:
|
||||
import _winapi
|
||||
|
@ -323,8 +322,6 @@ if _winapi:
|
|||
if (self._got_empty_message or
|
||||
_winapi.PeekNamedPipe(self._handle)[0] != 0):
|
||||
return True
|
||||
if timeout < 0:
|
||||
timeout = None
|
||||
return bool(wait([self], timeout))
|
||||
|
||||
def _get_more_data(self, ov, maxsize):
|
||||
|
@ -402,8 +399,6 @@ class Connection(_ConnectionBase):
|
|||
return self._recv(size)
|
||||
|
||||
def _poll(self, timeout):
|
||||
if timeout < 0.0:
|
||||
timeout = None
|
||||
r = wait([self._handle], timeout)
|
||||
return bool(r)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue