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

Unified Diff: vm/message_queue.cc

Issue 8370016: Revert https://code.google.com/p/dart/source/detail?r=597 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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
« no previous file with comments | « no previous file | vm/thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/message_queue.cc
===================================================================
--- vm/message_queue.cc (revision 621)
+++ vm/message_queue.cc (working copy)
@@ -40,13 +40,9 @@
PortMessage* MessageQueue::Dequeue(int64_t millis) {
MonitorLocker ml(&monitor_);
PortMessage* result = head_;
- // Wait may wake up prematurely, so we need to loop until result != NULL
- while (result == NULL) {
+ if (result == NULL) {
ml.Wait(millis);
result = head_;
- // If there's a time-out the caller must check for NULL anyway.
- if (0 < millis)
- break;
}
if (result != NULL) {
head_ = result->next_;
« no previous file with comments | « no previous file | vm/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698