OR-Tools  8.2
ThreadPool

Detailed Description

Definition at line 26 of file threadpool.h.

Public Member Functions

 ThreadPool (const std::string &prefix, int num_threads)
 
 ~ThreadPool ()
 
void StartWorkers ()
 
void Schedule (std::function< void()> closure)
 
std::function< void()> GetNextTask ()
 
void SetQueueCapacity (int capacity)
 

Constructor & Destructor Documentation

◆ ThreadPool()

ThreadPool ( const std::string &  prefix,
int  num_threads 
)

Definition at line 28 of file threadpool.cc.

◆ ~ThreadPool()

~ThreadPool ( )

Definition at line 31 of file threadpool.cc.

Member Function Documentation

◆ GetNextTask()

std::function< void()> GetNextTask ( )

Definition at line 56 of file threadpool.cc.

◆ Schedule()

void Schedule ( std::function< void()>  closure)

Definition at line 77 of file threadpool.cc.

◆ SetQueueCapacity()

void SetQueueCapacity ( int  capacity)

Definition at line 43 of file threadpool.cc.

◆ StartWorkers()

void StartWorkers ( )

Definition at line 49 of file threadpool.cc.


The documentation for this class was generated from the following files: