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

Unified Diff: build/android/devil/android/decorators.py

Issue 1376473006: Associate threads in reraiser_thread.RunAsync with the calling ThreadGroup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase due to patch failure on win bot Created 5 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/PRESUBMIT.py ('k') | build/android/devil/android/sdk/adb_wrapper.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/devil/android/decorators.py
diff --git a/build/android/devil/android/decorators.py b/build/android/devil/android/decorators.py
index c90532f95d7375d51f6fbeb05acc3cbfa208aae7..b263790b709b91dc827f5adcce523a92ff9b12fc 100644
--- a/build/android/devil/android/decorators.py
+++ b/build/android/devil/android/decorators.py
@@ -9,7 +9,6 @@ Function/method decorators that provide timeout and retry logic.
import functools
import itertools
import sys
-import threading
from devil.android import device_errors
from devil.utils import cmd_helper
@@ -44,8 +43,8 @@ def _TimeoutRetryWrapper(f, timeout_func, retries_func, pass_values=False):
def impl():
return f(*args, **kwargs)
try:
- if isinstance(threading.current_thread(),
- timeout_retry.TimeoutRetryThread):
+ if timeout_retry.CurrentTimeoutThreadGroup():
+ # Don't wrap if there's already an outer timeout thread.
return impl()
else:
desc = '%s(%s)' % (f.__name__, ', '.join(itertools.chain(
« no previous file with comments | « build/android/PRESUBMIT.py ('k') | build/android/devil/android/sdk/adb_wrapper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698