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

Side by Side Diff: build/android/devil/utils/reraiser_thread.py

Issue 1314913009: [Android] Move some pylib modules into devil/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « build/android/devil/utils/parallelizer_test.py ('k') | build/android/devil/utils/reset_usb.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Thread and ThreadGroup that reraise exceptions on the main thread.""" 5 """Thread and ThreadGroup that reraise exceptions on the main thread."""
6 # pylint: disable=W0212 6 # pylint: disable=W0212
7 7
8 import logging 8 import logging
9 import sys 9 import sys
10 import threading 10 import threading
11 import traceback 11 import traceback
12 12
13 from pylib.utils import watchdog_timer 13 from devil.utils import watchdog_timer
14 14
15 15
16 class TimeoutError(Exception): 16 class TimeoutError(Exception):
17 """Module-specific timeout exception.""" 17 """Module-specific timeout exception."""
18 pass 18 pass
19 19
20 20
21 def LogThreadStack(thread): 21 def LogThreadStack(thread):
22 """Log the stack for the given thread. 22 """Log the stack for the given thread.
23 23
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 def GetAllReturnValues(self, watcher=None): 149 def GetAllReturnValues(self, watcher=None):
150 """Get all return values, joining all threads if necessary. 150 """Get all return values, joining all threads if necessary.
151 151
152 Args: 152 Args:
153 watcher: same as in |JoinAll|. Only used if threads are alive. 153 watcher: same as in |JoinAll|. Only used if threads are alive.
154 """ 154 """
155 if any([t.isAlive() for t in self._threads]): 155 if any([t.isAlive() for t in self._threads]):
156 self.JoinAll(watcher) 156 self.JoinAll(watcher)
157 return [t.GetReturnValue() for t in self._threads] 157 return [t.GetReturnValue() for t in self._threads]
158 158
OLDNEW
« no previous file with comments | « build/android/devil/utils/parallelizer_test.py ('k') | build/android/devil/utils/reset_usb.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698