Chromium Code Reviews| Index: build/android/devil/utils/reraiser_thread.py |
| diff --git a/build/android/devil/utils/reraiser_thread.py b/build/android/devil/utils/reraiser_thread.py |
| index e108fc754fbe9befd62c25dfe1e68f97ef071161..dbaa1ea0d7fe72f25e0c3f3a5b669f870f553669 100644 |
| --- a/build/android/devil/utils/reraiser_thread.py |
| +++ b/build/android/devil/utils/reraiser_thread.py |
| @@ -226,3 +226,13 @@ def RunAsync(funcs, watcher=None): |
| thread_group = ReraiserThreadGroup(ReraiserThread(f) for f in funcs) |
| thread_group.StartAll(will_block=True) |
| return thread_group.GetAllReturnValues(watcher=watcher) |
| + |
| +def RunThreadsSync(threads): |
|
jbudorick
2015/11/17 18:04:46
There's no reason why both this and RunAsync shoul
mikecase (-- gone --)
2015/11/19 01:35:37
Added support to RunAsync to pass args and kwargs
|
| + """Runs the given threads in parallel and blocks until all threads finish. |
| + |
| + Args: |
| + threads: List of reraiser_thread objects. |
| + """ |
| + workers = ReraiserThreadGroup(threads) |
| + workers.StartAll() |
| + workers.JoinAll() |