Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b38897fc
Commit
b38897fc
authored
Apr 17, 2013
by
Giampaolo Rodola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue #17707: multiprocessing.Queue's get() method does not block for short timeouts.
parent
643ea53c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
Lib/multiprocessing/connection.py
Lib/multiprocessing/connection.py
+1
-1
Lib/test/test_multiprocessing.py
Lib/test/test_multiprocessing.py
+7
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/multiprocessing/connection.py
View file @
b38897fc
...
...
@@ -865,7 +865,7 @@ else:
if
hasattr
(
select
,
'poll'
):
def
_poll
(
fds
,
timeout
):
if
timeout
is
not
None
:
timeout
=
int
(
timeout
)
*
1000
# timeout is in milliseconds
timeout
=
int
(
timeout
*
1000
)
# timeout is in milliseconds
fd_map
=
{}
pollster
=
select
.
poll
()
for
fd
in
fds
:
...
...
Lib/test/test_multiprocessing.py
View file @
b38897fc
...
...
@@ -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
)
#
#
#
...
...
Misc/NEWS
View file @
b38897fc
...
...
@@ -29,6 +29,9 @@ Core and Builtins
Library
-------
-
Issue
#
17707
:
multiprocessing
.
Queue
's get() method does not block for short
timeouts.
- Issue #17012: shutil.which() no longer fallbacks to the PATH environment
variable if empty path argument is specified. Patch by Serhiy Storchaka.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment