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..19d9b3bd3ebc83da335f11f84b7f8d817f58608e 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): |
"""Join all threads without stack dumps. |
Reraises exceptions raised by the child threads and supports breaking |
@@ -127,7 +127,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 |
@@ -137,6 +137,8 @@ class ReraiserThreadGroup(object): |
Args: |
watcher: Watchdog object providing timeout, by default waits forever. |
""" |
+ if watcher is None: |
+ watcher = watchdog_timer.WatchdogTimer(None) |
try: |
self._JoinAll(watcher) |
except TimeoutError: |
@@ -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: |