| Index: runtime/vm/message_handler.h
|
| ===================================================================
|
| --- runtime/vm/message_handler.h (revision 29277)
|
| +++ runtime/vm/message_handler.h (working copy)
|
| @@ -53,8 +53,15 @@
|
| // Returns true on success.
|
| bool HandleOOBMessages();
|
|
|
| + // The number of opened control ports is determined whether the isolate has
|
| + // live ports. An isolate is considered not having any live ports if only
|
| + // control ports are open.
|
| + // Usually either 0 or 1.
|
| + void increment_control_ports();
|
| + void decrement_control_ports();
|
| +
|
| // A message handler tracks how many live ports it has.
|
| - bool HasLivePorts() const { return live_ports_ > 0; }
|
| + bool HasLivePorts() const { return live_ports_ > control_ports_; }
|
|
|
| #if defined(DEBUG)
|
| // Check that it is safe to access this message handler.
|
| @@ -120,7 +127,8 @@
|
| Monitor monitor_; // Protects all fields in MessageHandler.
|
| MessageQueue* queue_;
|
| MessageQueue* oob_queue_;
|
| - intptr_t live_ports_;
|
| + intptr_t control_ports_; // The number of open control ports usually 0 or 1.
|
| + intptr_t live_ports_; // The number of open ports, including control ports.
|
| ThreadPool* pool_;
|
| ThreadPool::Task* task_;
|
| StartCallback start_callback_;
|
|
|