Instrument Neutral Distributed Interface INDI 2.2.5
Public Member Functions | Friends | List of all members
httplib::ThreadPool Class Referencefinal

#include <httplib.h>

Inheritance diagram for httplib::ThreadPool:
httplib::TaskQueue

Public Member Functions

 ThreadPool (size_t n, size_t mqr=0)
 
 ThreadPool (const ThreadPool &)=delete
 
 ~ThreadPool () override=default
 
bool enqueue (std::function< void()> fn) override
 
void shutdown () override
 
- Public Member Functions inherited from httplib::TaskQueue
 TaskQueue ()=default
 
virtual ~TaskQueue ()=default
 
virtual void on_idle ()
 

Friends

struct worker
 

Detailed Description

Definition at line 970 of file httplib.h.

Constructor & Destructor Documentation

◆ ThreadPool() [1/2]

httplib::ThreadPool::ThreadPool ( size_t  n,
size_t  mqr = 0 
)
inlineexplicit

Definition at line 973 of file httplib.h.

◆ ThreadPool() [2/2]

httplib::ThreadPool::ThreadPool ( const ThreadPool &  )
delete

◆ ~ThreadPool()

httplib::ThreadPool::~ThreadPool ( )
overridedefault

Member Function Documentation

◆ enqueue()

bool httplib::ThreadPool::enqueue ( std::function< void()>  fn)
inlineoverridevirtual

Implements httplib::TaskQueue.

Definition at line 987 of file httplib.h.

◆ shutdown()

void httplib::ThreadPool::shutdown ( )
inlineoverridevirtual

Implements httplib::TaskQueue.

Definition at line 1002 of file httplib.h.

Friends And Related Symbol Documentation

◆ worker

friend struct worker
friend

Definition at line 1056 of file httplib.h.


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