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_ 34