maph 1.0.0 High-Performance Memory-Mapped Key-Value Database with O(1) Lookups

Loading...
Searching...
No Matches
Classes | Public Member Functions | Friends | List of all members
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
virtual void | on_idle ()

## Friends
struct | worker

## Detailed Description

Definition at line 871 of file httplib.h.

## Constructor & Destructor Documentation

## ◆ ThreadPool() [1/2]

httplib::ThreadPool::ThreadPool | ( | size_t | n,
|  | size_t | mqr = `0`
| ) |  |
| inline explicit

Definition at line 873 of file httplib.h.

References worker.

## ◆ ThreadPool() [2/2]

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

## ◆ ~ThreadPool()

httplib::ThreadPool::~ThreadPool | ( |  | ) |
| override default

## Member Function Documentation

## ◆ enqueue()

bool httplib::ThreadPool::enqueue | ( | std::function< void()> | fn | ) |
| inline override virtual

Implements httplib::TaskQueue.

Definition at line 884 of file httplib.h.

## ◆ on_idle()

virtual void httplib::TaskQueue::on_idle | ( |  | ) |
| inline virtual inherited

Definition at line 868 of file httplib.h.

## ◆ shutdown()

void httplib::ThreadPool::shutdown | ( |  | ) |
| inline override virtual

Implements httplib::TaskQueue.

Definition at line 897 of file httplib.h.

## Friends And Related Symbol Documentation

## ◆ worker

friend struct worker
| friend

Definition at line 943 of file httplib.h.

Referenced by ThreadPool().

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

- integrations/rest_api/httplib.h