#include "net/base/prioritized_task_runner.h"
#include <algorithm>
#include "base/functional/bind.h"
#include "base/task/task_runner.h"
#include "base/task/thread_pool.h"
namespace net {
PrioritizedTaskRunner::Job::Job(const base::Location& from_here,
base::OnceClosure task,
base::OnceClosure reply,
uint32_t priority,
uint32_t task_count)
: … { … }
PrioritizedTaskRunner::Job::Job() = default;
PrioritizedTaskRunner::Job::~Job() = default;
PrioritizedTaskRunner::Job::Job(Job&& other) = default;
PrioritizedTaskRunner::Job& PrioritizedTaskRunner::Job::operator=(Job&& other) =
default;
PrioritizedTaskRunner::PrioritizedTaskRunner(
const base::TaskTraits& task_traits)
: … { … }
void PrioritizedTaskRunner::PostTaskAndReply(const base::Location& from_here,
base::OnceClosure task,
base::OnceClosure reply,
uint32_t priority) { … }
PrioritizedTaskRunner::~PrioritizedTaskRunner() = default;
void PrioritizedTaskRunner::RunTaskAndPostReply() { … }
void PrioritizedTaskRunner::RunReply() { … }
struct PrioritizedTaskRunner::JobComparer { … };
PrioritizedTaskRunner::JobPriorityQueue::JobPriorityQueue() = default;
PrioritizedTaskRunner::JobPriorityQueue::~JobPriorityQueue() = default;
void PrioritizedTaskRunner::JobPriorityQueue::Push(Job job) { … }
PrioritizedTaskRunner::Job PrioritizedTaskRunner::JobPriorityQueue::Pop() { … }
}