mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Fix issue #17707: multiprocessing.Queue's get() method does not block for short timeouts.
This commit is contained in:
parent
643ea53c14
commit
b38897fc91
3 changed files with 11 additions and 1 deletions
|
@ -698,6 +698,13 @@ class _TestQueue(BaseTestCase):
|
|||
for p in workers:
|
||||
p.join()
|
||||
|
||||
def test_timeout(self):
|
||||
q = multiprocessing.Queue()
|
||||
start = time.time()
|
||||
self.assertRaises(pyqueue.Empty, q.get, True, 0.2)
|
||||
delta = time.time() - start
|
||||
self.assertGreaterEqual(delta, 0.19)
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue