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

Side by Side Diff: runtime/vm/message.h

Issue 629533002: Fix deadlock that can occur while handling service messages at a breakpoint. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/message_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_MESSAGE_H_ 5 #ifndef VM_MESSAGE_H_
6 #define VM_MESSAGE_H_ 6 #define VM_MESSAGE_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 public: 86 public:
87 MessageQueue(); 87 MessageQueue();
88 ~MessageQueue(); 88 ~MessageQueue();
89 89
90 void Enqueue(Message* msg); 90 void Enqueue(Message* msg);
91 91
92 // Gets the next message from the message queue or NULL if no 92 // Gets the next message from the message queue or NULL if no
93 // message is available. This function will not block. 93 // message is available. This function will not block.
94 Message* Dequeue(); 94 Message* Dequeue();
95 95
96 bool IsEmpty() { return head_ == NULL; }
97
96 // Clear all messages from the message queue. 98 // Clear all messages from the message queue.
97 void Clear(); 99 void Clear();
98 100
99 private: 101 private:
100 friend class MessageQueueTestPeer;
101
102 Message* head_; 102 Message* head_;
103 Message* tail_; 103 Message* tail_;
104 104
105 DISALLOW_COPY_AND_ASSIGN(MessageQueue); 105 DISALLOW_COPY_AND_ASSIGN(MessageQueue);
106 }; 106 };
107 107
108 } // namespace dart 108 } // namespace dart
109 109
110 #endif // VM_MESSAGE_H_ 110 #endif // VM_MESSAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/message_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698