| 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:
|
|
|