v8 10.2.154 (node 18.16.0)
V8 is Google's open source JavaScript engine
Loading...
Searching...
No Matches
libplatform.h
Go to the documentation of this file.
1// Copyright 2014 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_LIBPLATFORM_LIBPLATFORM_H_
6#define V8_LIBPLATFORM_LIBPLATFORM_H_
7
8#include <memory>
9
12#include "v8-platform.h" // NOLINT(build/include_directory)
13#include "v8config.h" // NOLINT(build/include_directory)
14
15namespace v8 {
16namespace platform {
17
20
21enum class MessageLoopBehavior : bool {
22 kDoNotWait = false,
23 kWaitForWork = true
24};
25
39V8_PLATFORM_EXPORT std::unique_ptr<v8::Platform> NewDefaultPlatform(
40 int thread_pool_size = 0,
42 InProcessStackDumping in_process_stack_dumping =
44 std::unique_ptr<v8::TracingController> tracing_controller = {});
45
50V8_PLATFORM_EXPORT std::unique_ptr<v8::Platform>
53 InProcessStackDumping in_process_stack_dumping =
55 std::unique_ptr<v8::TracingController> tracing_controller = {});
56
63V8_PLATFORM_EXPORT std::unique_ptr<v8::JobHandle> NewDefaultJobHandle(
64 v8::Platform* platform, v8::TaskPriority priority,
65 std::unique_ptr<v8::JobTask> job_task, size_t num_worker_threads);
66
78 v8::Platform* platform, v8::Isolate* isolate,
80
89 v8::Isolate* isolate,
90 double idle_time_in_seconds);
91
101 Isolate* isolate);
102
103} // namespace platform
104} // namespace v8
105
106#endif // V8_LIBPLATFORM_LIBPLATFORM_H_
#define V8_PLATFORM_EXPORT
V8_PLATFORM_EXPORT void NotifyIsolateShutdown(v8::Platform *platform, Isolate *isolate)
V8_PLATFORM_EXPORT std::unique_ptr< v8::Platform > NewDefaultPlatform(int thread_pool_size=0, IdleTaskSupport idle_task_support=IdleTaskSupport::kDisabled, InProcessStackDumping in_process_stack_dumping=InProcessStackDumping::kDisabled, std::unique_ptr< v8::TracingController > tracing_controller={})
V8_PLATFORM_EXPORT std::unique_ptr< v8::JobHandle > NewDefaultJobHandle(v8::Platform *platform, v8::TaskPriority priority, std::unique_ptr< v8::JobTask > job_task, size_t num_worker_threads)
V8_PLATFORM_EXPORT void RunIdleTasks(v8::Platform *platform, v8::Isolate *isolate, double idle_time_in_seconds)
V8_PLATFORM_EXPORT bool PumpMessageLoop(v8::Platform *platform, v8::Isolate *isolate, MessageLoopBehavior behavior=MessageLoopBehavior::kDoNotWait)
V8_PLATFORM_EXPORT std::unique_ptr< v8::Platform > NewSingleThreadedDefaultPlatform(IdleTaskSupport idle_task_support=IdleTaskSupport::kDisabled, InProcessStackDumping in_process_stack_dumping=InProcessStackDumping::kDisabled, std::unique_ptr< v8::TracingController > tracing_controller={})
TaskPriority
Definition v8-platform.h:21