folly/folly/executors/EDFThreadPoolExecutor.cpp

/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <folly/executors/EDFThreadPoolExecutor.h>

#include <algorithm>
#include <array>
#include <atomic>
#include <chrono>
#include <cstddef>
#include <exception>
#include <limits>
#include <memory>
#include <queue>
#include <utility>
#include <vector>

#include <glog/logging.h>
#include <folly/ScopeGuard.h>
#include <folly/concurrency/ProcessLocalUniqueId.h>
#include <folly/synchronization/LifoSem.h>
#include <folly/synchronization/ThrottledLifoSem.h>
#include <folly/tracing/StaticTracepoint.h>

namespace folly {

class EDFThreadPoolExecutor::Task {};

class EDFThreadPoolExecutor::TaskQueue {};

/* static */ std::unique_ptr<EDFThreadPoolSemaphore>
EDFThreadPoolExecutor::makeDefaultSemaphore() {}

/* static */ std::unique_ptr<EDFThreadPoolSemaphore>
EDFThreadPoolExecutor::makeThrottledLifoSemSemaphore(
    std::chrono::nanoseconds wakeUpInterval) {}

EDFThreadPoolExecutor::EDFThreadPoolExecutor(
    std::size_t numThreads,
    std::shared_ptr<ThreadFactory> threadFactory,
    std::unique_ptr<EDFThreadPoolSemaphore> semaphore)
    :{}

EDFThreadPoolExecutor::~EDFThreadPoolExecutor() {}

void EDFThreadPoolExecutor::add(Func f) {}

void EDFThreadPoolExecutor::add(Func f, std::size_t total, uint64_t deadline) {}

void EDFThreadPoolExecutor::add(std::vector<Func> fs, uint64_t deadline) {}

size_t EDFThreadPoolExecutor::getTaskQueueSize() const {}

void EDFThreadPoolExecutor::threadRun(ThreadPtr thread) {}

// threadListLock_ is writelocked.
void EDFThreadPoolExecutor::stopThreads(std::size_t numThreads) {}

// threadListLock_ is read (or write) locked.
std::size_t EDFThreadPoolExecutor::getPendingTaskCountImpl() const {}

bool EDFThreadPoolExecutor::shouldStop() {}

std::shared_ptr<EDFThreadPoolExecutor::Task> EDFThreadPoolExecutor::take() {}

void EDFThreadPoolExecutor::fillTaskInfo(const Task& task, TaskInfo& info) {}

void EDFThreadPoolExecutor::registerTaskEnqueue(const Task& task) {}

} // namespace folly