Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::ThreadPool Class Reference

#include <threadpool.h>

Public Member Functions

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

Detailed Description

Definition at line 28 of file threadpool.h.

Constructor & Destructor Documentation

◆ ThreadPool() [1/2]

operations_research::ThreadPool::ThreadPool ( int num_threads)
explicit

Definition at line 32 of file threadpool.cc.

◆ ThreadPool() [2/2]

operations_research::ThreadPool::ThreadPool ( absl::string_view prefix,
int num_threads )

Definition at line 34 of file threadpool.cc.

◆ ~ThreadPool()

operations_research::ThreadPool::~ThreadPool ( )

Definition at line 37 of file threadpool.cc.

Member Function Documentation

◆ GetNextTask()

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

Definition at line 62 of file threadpool.cc.

◆ Schedule()

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

Definition at line 83 of file threadpool.cc.

◆ SetQueueCapacity()

void operations_research::ThreadPool::SetQueueCapacity ( int capacity)

Definition at line 49 of file threadpool.cc.

◆ StartWorkers()

void operations_research::ThreadPool::StartWorkers ( )

Definition at line 55 of file threadpool.cc.


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