Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Unified Diff: build/android/pylib/utils/reraiser_thread.py

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/utils/isolator.py ('k') | build/android/pylib/utils/timeout_retry.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/utils/reraiser_thread.py
diff --git a/build/android/pylib/utils/reraiser_thread.py b/build/android/pylib/utils/reraiser_thread.py
index 2964bef1e8265e3931e2cdda15f626d8f131cc77..0ec16b1908c85c61e5b66d5895373bb7d2fe67b3 100644
--- a/build/android/pylib/utils/reraiser_thread.py
+++ b/build/android/pylib/utils/reraiser_thread.py
@@ -26,7 +26,7 @@ def LogThreadStack(thread):
"""
stack = sys._current_frames()[thread.ident]
logging.critical('*' * 80)
- logging.critical('Stack dump for thread \'%s\'', thread.name)
+ logging.critical('Stack dump for thread %r', thread.name)
logging.critical('*' * 80)
for filename, lineno, name, line in traceback.extract_stack(stack):
logging.critical('File: "%s", line %d, in %s', filename, lineno, name)
@@ -104,7 +104,7 @@ class ReraiserThreadGroup(object):
for thread in self._threads:
thread.start()
- def _JoinAll(self, watcher=watchdog_timer.WatchdogTimer(None)):
+ def _JoinAll(self, watcher=None):
"""Join all threads without stack dumps.
Reraises exceptions raised by the child threads and supports breaking
@@ -113,6 +113,8 @@ class ReraiserThreadGroup(object):
Args:
watcher: Watchdog object providing timeout, by default waits forever.
"""
+ if watcher is None:
+ watcher = watchdog_timer.WatchdogTimer(None)
alive_threads = self._threads[:]
while alive_threads:
for thread in alive_threads[:]:
@@ -127,7 +129,7 @@ class ReraiserThreadGroup(object):
for thread in self._threads:
thread.ReraiseIfException()
- def JoinAll(self, watcher=watchdog_timer.WatchdogTimer(None)):
+ def JoinAll(self, watcher=None):
"""Join all threads.
Reraises exceptions raised by the child threads and supports breaking
@@ -144,7 +146,7 @@ class ReraiserThreadGroup(object):
LogThreadStack(thread)
raise
- def GetAllReturnValues(self, watcher=watchdog_timer.WatchdogTimer(None)):
+ def GetAllReturnValues(self, watcher=None):
"""Get all return values, joining all threads if necessary.
Args:
« no previous file with comments | « build/android/pylib/utils/isolator.py ('k') | build/android/pylib/utils/timeout_retry.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698