chromium/base/task/sequence_manager/fence.h

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef BASE_TASK_SEQUENCE_MANAGER_FENCE_H_
#define BASE_TASK_SEQUENCE_MANAGER_FENCE_H_

#include "base/base_export.h"
#include "base/task/sequence_manager/enqueue_order.h"
#include "base/task/sequence_manager/task_order.h"

namespace base {

class TimeTicks;

namespace sequence_manager {
namespace internal {

class TaskQueueImpl;

// `Fence`s are used to prevent the execution of tasks starting with a
// particular `TaskOrder`, such that for a `Task` and a `Fence`, if
// task.task_order() >= fence.task_order(), then the task is blocked from
// running. Blocking fences are a special kind of fence that have a `TaskOrder`
// less than that of any `Task`.
class BASE_EXPORT Fence {};

}  // namespace internal
}  // namespace sequence_manager
}  // namespace base

#endif  // BASE_TASK_SEQUENCE_MANAGER_FENCE_H_