diff options
Diffstat (limited to 'runtime/thread_list.cc')
-rw-r--r-- | runtime/thread_list.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/thread_list.cc b/runtime/thread_list.cc index 3cc2a2892d..2dbfb3ebc7 100644 --- a/runtime/thread_list.cc +++ b/runtime/thread_list.cc @@ -156,7 +156,11 @@ class DumpCheckpoint FINAL : public Closure { void WaitForThreadsToRunThroughCheckpoint(size_t threads_running_checkpoint) { Thread* self = Thread::Current(); ScopedThreadStateChange tsc(self, kWaitingForCheckPointsToRun); - barrier_.Increment(self, threads_running_checkpoint); + const uint32_t kWaitTimeoutMs = 10000; + bool timed_out = barrier_.Increment(self, threads_running_checkpoint, kWaitTimeoutMs); + if (timed_out) { + LOG(kIsDebugBuild ? FATAL : ERROR) << "Unexpected time out during dump checkpoint."; + } } private: |