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

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

Issue 636273004: Make TimeoutRetryThread's stoppable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: do not catch CommandFailedError in _WaitFor 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
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..61433cfbb6a639a6ff6590119ac499e36c604e61 100644
--- a/build/android/pylib/utils/reraiser_thread.py
+++ b/build/android/pylib/utils/reraiser_thread.py
@@ -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:

Powered by Google App Engine
This is Rietveld 408576698