chromium/base/task/thread_pool/worker_thread_set.h

// Copyright 2016 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_THREAD_POOL_WORKER_THREAD_SET_H_
#define BASE_TASK_THREAD_POOL_WORKER_THREAD_SET_H_

#include <stddef.h>

#include <set>

#include "base/base_export.h"
#include "base/memory/raw_ptr.h"

namespace base {
namespace internal {

class WorkerThread;

// An ordered set of WorkerThreads which has custom logic to treat the worker at
// the front of the set as being "in-use" (so its time in that position doesn't
// count towards being inactive / reclaimable). Supports removal of arbitrary
// WorkerThreads. DCHECKs when a WorkerThread is inserted multiple times.
// WorkerThreads are not owned by the set. All operations are amortized
// O(log(n)). This class is NOT thread-safe.
class BASE_EXPORT WorkerThreadSet {};

}  // namespace internal
}  // namespace base

#endif  // BASE_TASK_THREAD_POOL_WORKER_THREAD_SET_H_