OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef V8_TEST_INSPECTOR_PROTOCOL_TASK_QUEUE_H_ |
| 6 #define V8_TEST_INSPECTOR_PROTOCOL_TASK_QUEUE_H_ |
| 7 |
| 8 #include "include/v8.h" |
| 9 #include "src/base/macros.h" |
| 10 #include "src/base/platform/platform.h" |
| 11 #include "src/locked-queue-inl.h" |
| 12 |
| 13 namespace v8_inspector { |
| 14 |
| 15 class Task; |
| 16 |
| 17 class TaskQueue { |
| 18 public: |
| 19 TaskQueue(); |
| 20 ~TaskQueue(); |
| 21 |
| 22 void Append(Task* task); |
| 23 Task* GetNext(bool only_protocol); |
| 24 |
| 25 void SetContext(v8::Local<v8::Context>); |
| 26 static TaskQueue* FromContext(v8::Local<v8::Context>); |
| 27 |
| 28 private: |
| 29 v8::internal::LockedQueue<Task*> queue_; |
| 30 v8::internal::LockedQueue<Task*> deffered_queue_; |
| 31 v8::base::Semaphore process_queue_semaphore_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(TaskQueue); |
| 34 }; |
| 35 |
| 36 } // v8_inspector |
| 37 |
| 38 #endif // V8_TEST_INSPECTOR_PROTOCOL_TASK_QUEUE_H_ |
OLD | NEW |