1 #ifndef SRC_NODE_PLATFORM_H_ 2 #define SRC_NODE_PLATFORM_H_ 7 #include "libplatform/libplatform.h" 30 int outstanding_tasks_;
32 std::queue<T*> task_queue_;
38 v8::TracingController* tracing_controller);
41 void DrainBackgroundTasks();
42 void FlushForegroundTasksInternal();
46 size_t NumberOfAvailableBackgroundThreads()
override;
47 void CallOnBackgroundThread(v8::Task* task,
48 ExpectedRuntime expected_runtime)
override;
49 void CallOnForegroundThread(v8::Isolate* isolate, v8::Task* task)
override;
50 void CallDelayedOnForegroundThread(v8::Isolate* isolate, v8::Task* task,
51 double delay_in_seconds)
override;
52 bool IdleTasksEnabled(v8::Isolate* isolate)
override;
53 double MonotonicallyIncreasingTime()
override;
54 v8::TracingController* GetTracingController()
override;
57 uv_loop_t*
const loop_;
58 uv_async_t flush_tasks_;
62 std::vector<std::unique_ptr<uv_thread_t>> threads_;
64 std::unique_ptr<v8::TracingController> tracing_controller_;
69 #endif // SRC_NODE_PLATFORM_H_
void NotifyOfCompletion()