#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 { … };
std::unique_ptr<EDFThreadPoolSemaphore>
EDFThreadPoolExecutor::makeDefaultSemaphore() { … }
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) { … }
void EDFThreadPoolExecutor::stopThreads(std::size_t numThreads) { … }
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) { … }
}