Index: runtime/vm/thread_test.cc |
diff --git a/runtime/vm/thread_test.cc b/runtime/vm/thread_test.cc |
index ff8b5635278352075d8365bb9a50d983c4ca035a..1305a1c51b3c2ad0d6d606ed0b03fdb0712274a2 100644 |
--- a/runtime/vm/thread_test.cc |
+++ b/runtime/vm/thread_test.cc |
@@ -5,6 +5,7 @@ |
#include "platform/assert.h" |
#include "vm/isolate.h" |
#include "vm/unit_test.h" |
+#include "vm/signal_handler.h" |
#include "vm/thread.h" |
namespace dart { |
@@ -42,6 +43,10 @@ UNIT_TEST_CASE(Monitor) { |
const int kNumAttempts = 5; |
int attempts = 0; |
while (attempts < kNumAttempts) { |
+ // This test verifies that a monitor returns after the specified timeout. If |
+ // a signal is delivered to this thread, the monitor may return early. |
+ // Block signal delivery in this scope. |
+ ScopedSignalBlocker ssb; |
MonitorLocker ml(monitor); |
int64_t start = OS::GetCurrentTimeMillis(); |
int64_t wait_time = 2017; |