diff options
author | Richard Oudkerk <shibturn@gmail.com> | 2013-01-13 22:52:13 (GMT) |
---|---|---|
committer | Richard Oudkerk <shibturn@gmail.com> | 2013-01-13 22:52:13 (GMT) |
commit | 0ee84e04da7883623842d67bb1b1706bfacab309 (patch) | |
tree | 28c83010d8a878bdbf55cb12856e5c400e52eca2 | |
parent | 9e189f0a28ed99a29915dda839b913109a178111 (diff) | |
parent | ed9e06cb21c4437aa87bb23c6509d3dd3274d0fc (diff) | |
download | cpython-0ee84e04da7883623842d67bb1b1706bfacab309.zip cpython-0ee84e04da7883623842d67bb1b1706bfacab309.tar.gz cpython-0ee84e04da7883623842d67bb1b1706bfacab309.tar.bz2 |
Issue #16955: Fix the poll() method for multiprocessing's socket
connections on Windows.
-rw-r--r-- | Lib/multiprocessing/connection.py | 2 | ||||
-rw-r--r-- | Lib/test/test_multiprocessing.py | 11 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
3 files changed, 15 insertions, 1 deletions
diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py index dc31f2f..74fc958 100644 --- a/Lib/multiprocessing/connection.py +++ b/Lib/multiprocessing/connection.py @@ -405,7 +405,7 @@ class Connection(_ConnectionBase): return self._recv(size) def _poll(self, timeout): - r = wait([self._handle], timeout) + r = wait([self], timeout) return bool(r) diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py index d973b44..9fd8118 100644 --- a/Lib/test/test_multiprocessing.py +++ b/Lib/test/test_multiprocessing.py @@ -2358,6 +2358,17 @@ class _TestListenerClient(BaseTestCase): p.join() l.close() + def test_issue16955(self): + for fam in self.connection.families: + l = self.connection.Listener(family=fam) + c = self.connection.Client(l.address) + a = l.accept() + a.send_bytes(b"hello") + self.assertTrue(c.poll(1)) + a.close() + c.close() + l.close() + class _TestPoll(unittest.TestCase): ALLOWED_TYPES = ('processes', 'threads') @@ -217,6 +217,9 @@ Core and Builtins Library ------- +- Issue #16955: Fix the poll() method for multiprocessing's socket + connections on Windows. + - SSLContext.load_dh_params() now properly closes the input file. - Issue #16829: IDLE printing no longer fails if there are spaces or other |