#include <errno.h>
#include <string.h>
#include <thread>
#include "absl/log/absl_log.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_join.h"
#include "mediapipe/framework/deps/threadpool.h"
namespace mediapipe {
class ThreadPool::WorkerThread { … };
ThreadPool::WorkerThread::WorkerThread(ThreadPool* pool,
const std::string& name_prefix)
: … { … }
ThreadPool::WorkerThread::~WorkerThread() { … }
void ThreadPool::WorkerThread::Join() { … }
void* ThreadPool::WorkerThread::ThreadBody(void* arg) { … }
ThreadPool::ThreadPool(int num_threads) { … }
ThreadPool::ThreadPool(const std::string& name_prefix, int num_threads)
: … { … }
ThreadPool::ThreadPool(const ThreadOptions& thread_options,
const std::string& name_prefix, int num_threads)
: … { … }
ThreadPool::~ThreadPool() { … }
void ThreadPool::StartWorkers() { … }
void ThreadPool::Schedule(std::function<void()> callback) { … }
int ThreadPool::num_threads() const { … }
void ThreadPool::RunWorker() { … }
const ThreadOptions& ThreadPool::thread_options() const { … }
namespace internal {
std::string CreateThreadName(const std::string& prefix, int thread_id) { … }
}
}