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
f8904e99
Commit
f8904e99
authored
Mar 06, 2015
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #22853: Added regression test for using multiprocessing.Queue at import
time. Patch by Davin Potts.
parent
c19ed375
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
Lib/test/_test_multiprocessing.py
Lib/test/_test_multiprocessing.py
+21
-0
No files found.
Lib/test/_test_multiprocessing.py
View file @
f8904e99
...
@@ -713,6 +713,27 @@ class _TestQueue(BaseTestCase):
...
@@ -713,6 +713,27 @@ class _TestQueue(BaseTestCase):
for
p
in
workers
:
for
p
in
workers
:
p
.
join
()
p
.
join
()
def
test_no_import_lock_contention
(
self
):
with
test
.
support
.
temp_cwd
():
module_name
=
'imported_by_an_imported_module'
with
open
(
module_name
+
'.py'
,
'w'
)
as
f
:
f
.
write
(
"""if 1:
import multiprocessing
q = multiprocessing.Queue()
q.put('knock knock')
q.get(timeout=3)
q.close()
del q
"""
)
with
test
.
support
.
DirsOnSysPath
(
os
.
getcwd
()):
try
:
__import__
(
module_name
)
except
pyqueue
.
Empty
:
self
.
fail
(
"Probable regression on import lock contention;"
" see Issue #22853"
)
def
test_timeout
(
self
):
def
test_timeout
(
self
):
q
=
multiprocessing
.
Queue
()
q
=
multiprocessing
.
Queue
()
start
=
time
.
time
()
start
=
time
.
time
()
...
...
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