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

Unified Diff: runtime/vm/thread_test.cc

Issue 8362026: Fixed a problem with spurious wakeups. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 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
« runtime/vm/thread.h ('K') | « runtime/vm/thread_macos.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread_test.cc
diff --git a/runtime/vm/thread_test.cc b/runtime/vm/thread_test.cc
index e8dd4dc9ca0d8eb78bec64c303e05e32957c0f64..22951ccfef11a34e166ea6f640cc2f3f536b98b4 100644
--- a/runtime/vm/thread_test.cc
+++ b/runtime/vm/thread_test.cc
@@ -45,6 +45,7 @@ UNIT_TEST_CASE(Monitor) {
int64_t wait_time = 2017;
Monitor::WaitResult wait_result = ml.Wait(wait_time);
int64_t stop = OS::GetCurrentTimeMillis();
+ // Note: This may fail due to spurious wakeups in pthread_cond_wait().
EXPECT_EQ(Monitor::kTimedOut, wait_result);
const int kAcceptableTimeJitter = 20; // Measured in milliseconds.
EXPECT_LE(wait_time - kAcceptableTimeJitter, stop - start);
« runtime/vm/thread.h ('K') | « runtime/vm/thread_macos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698