Skip to content

Make sure that backend testing in multiprocessing is done with a timeout #3741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 1, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Use map_async and get to avoid a deadlock
  • Loading branch information
jenshnielsen committed Oct 29, 2014
commit 1a182a98f76ce8c624bbaf3882e40d799e867338
9 changes: 6 additions & 3 deletions setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -1788,7 +1788,8 @@ def check_requirements(self):
except:
return "unknown (can not use multiprocessing to determine)"
try:
success, msg = p.map(backend_gtk3agg_internal_check, [0])[0]
res = p.map_async(backend_gtk3agg_internal_check, [0])
success, msg = res.get(timeout=5)[0]
except:
success = False
msg = "Could not determine"
Expand Down Expand Up @@ -1852,7 +1853,8 @@ def check_requirements(self):
p = multiprocessing.Pool()
except:
return "unknown (can not use multiprocessing to determine)"
success, msg = p.map(backend_gtk3cairo_internal_check, [0])[0]
res = p.map_async(backend_gtk3cairo_internal_check, [0])
success, msg = res.get(timeout=5)[0]
p.close()
p.join()
if success:
Expand Down Expand Up @@ -1988,7 +1990,8 @@ def check_requirements(self):
else:
# Multiprocessing OK
try:
msg = p.map(self.callback, [self])[0]
res = p.map_async(self.callback, [self])
msg = res.get(timeout=5)[0]
except:
# If we hit an error on multiprocessing raise it
raise
Expand Down