Project Alice
Loading...
Searching...
No Matches
httplib::ThreadPool Class Referencefinal

#include <httplib.h>

Inheritance diagram for httplib::ThreadPool:
Collaboration diagram for httplib::ThreadPool:

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 bool enqueue (std::function< void()> fn)=0
 
virtual void shutdown ()=0
 
virtual void on_idle ()
 

Friends

struct worker
 

Detailed Description

Definition at line 754 of file httplib.h.

Constructor & Destructor Documentation

◆ ThreadPool() [1/2]

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

Definition at line 756 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 767 of file httplib.h.

◆ shutdown()

void httplib::ThreadPool::shutdown ( )
inlineoverridevirtual

Implements httplib::TaskQueue.

Definition at line 780 of file httplib.h.

Friends And Related Function Documentation

◆ worker

friend struct worker
friend

Definition at line 826 of file httplib.h.


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