summaryrefslogtreecommitdiff
path: root/Lib/multiprocessing/connection.py
diff options
context:
space:
mode:
authorRichard Oudkerk <shibturn@gmail.com>2012-05-10 16:11:12 +0100
committerRichard Oudkerk <shibturn@gmail.com>2012-05-10 16:11:12 +0100
commit59d5404bc79beaa39c76fb26012238b26e9b0166 (patch)
tree071cc74196e6fcc572c836b6be02a8d9a6bfc276 /Lib/multiprocessing/connection.py
parentca5f91b888bc0056fc08d062f65cc783bbba8532 (diff)
downloadcpython-git-59d5404bc79beaa39c76fb26012238b26e9b0166.tar.gz
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.
Diffstat (limited to 'Lib/multiprocessing/connection.py')
-rw-r--r--Lib/multiprocessing/connection.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py
index acf43b1fef..56f375d237 100644
--- a/Lib/multiprocessing/connection.py
+++ b/Lib/multiprocessing/connection.py
@@ -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)