| OLD | NEW |
| 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_HANDLER_H_ | 5 #ifndef VM_MESSAGE_HANDLER_H_ |
| 6 #define VM_MESSAGE_HANDLER_H_ | 6 #define VM_MESSAGE_HANDLER_H_ |
| 7 | 7 |
| 8 #include "vm/isolate.h" | 8 #include "vm/isolate.h" |
| 9 #include "vm/message.h" | 9 #include "vm/message.h" |
| 10 #include "vm/thread.h" | 10 #include "vm/thread.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // | 47 // |
| 48 // Returns true on success. | 48 // Returns true on success. |
| 49 bool HandleNextMessage(); | 49 bool HandleNextMessage(); |
| 50 | 50 |
| 51 // Handles any OOB messages for this message handler. Can be used | 51 // Handles any OOB messages for this message handler. Can be used |
| 52 // even if the message handler is running on the thread pool. | 52 // even if the message handler is running on the thread pool. |
| 53 // | 53 // |
| 54 // Returns true on success. | 54 // Returns true on success. |
| 55 bool HandleOOBMessages(); | 55 bool HandleOOBMessages(); |
| 56 | 56 |
| 57 // Returns true if there are pending OOB messages for this message |
| 58 // handler. |
| 59 bool HasOOBMessages(); |
| 60 |
| 57 // A message handler tracks how many live ports it has. | 61 // A message handler tracks how many live ports it has. |
| 58 bool HasLivePorts() const { return live_ports_ > 0; } | 62 bool HasLivePorts() const { return live_ports_ > 0; } |
| 59 | 63 |
| 60 intptr_t live_ports() const { | 64 intptr_t live_ports() const { |
| 61 return live_ports_; | 65 return live_ports_; |
| 62 } | 66 } |
| 63 | 67 |
| 64 bool paused() const { return paused_ > 0; } | 68 bool paused() const { return paused_ > 0; } |
| 65 | 69 |
| 66 void increment_paused() { paused_++; } | 70 void increment_paused() { paused_++; } |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 StartCallback start_callback_; | 171 StartCallback start_callback_; |
| 168 EndCallback end_callback_; | 172 EndCallback end_callback_; |
| 169 CallbackData callback_data_; | 173 CallbackData callback_data_; |
| 170 | 174 |
| 171 DISALLOW_COPY_AND_ASSIGN(MessageHandler); | 175 DISALLOW_COPY_AND_ASSIGN(MessageHandler); |
| 172 }; | 176 }; |
| 173 | 177 |
| 174 } // namespace dart | 178 } // namespace dart |
| 175 | 179 |
| 176 #endif // VM_MESSAGE_HANDLER_H_ | 180 #endif // VM_MESSAGE_HANDLER_H_ |
| OLD | NEW |