v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
task-utils.h
Go to the documentation of this file.
1// Copyright 2018 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_TASKS_TASK_UTILS_H_
6#define V8_TASKS_TASK_UTILS_H_
7
8#include <functional>
9#include <memory>
10
11namespace v8 {
12
13namespace internal {
14
15class CancelableIdleTask;
16class CancelableTask;
17class CancelableTaskManager;
18class Isolate;
19
20std::unique_ptr<CancelableTask> MakeCancelableTask(Isolate*,
21 std::function<void()>);
22std::unique_ptr<CancelableTask> MakeCancelableTask(CancelableTaskManager*,
23 std::function<void()>);
24
25std::unique_ptr<CancelableIdleTask> MakeCancelableIdleTask(
26 Isolate*, std::function<void(double)>);
27std::unique_ptr<CancelableIdleTask> MakeCancelableIdleTask(
28 CancelableTaskManager* manager, std::function<void(double)>);
29
30} // namespace internal
31} // namespace v8
32
33#endif // V8_TASKS_TASK_UTILS_H_
std::unique_ptr< CancelableIdleTask > MakeCancelableIdleTask(Isolate *isolate, std::function< void(double)> func)
Definition task-utils.cc:53
std::unique_ptr< CancelableTask > MakeCancelableTask(Isolate *isolate, std::function< void()> func)
Definition task-utils.cc:43