My Project: dht::ThreadPool Class Reference

My Project 3.7.7 C++ Distributed Hash Table

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
dht::ThreadPool Class Reference

## Public Member Functions
| ThreadPool (unsigned minThreads, unsigned maxThreads=0)
void | run (std::function< void()> &&cb)
template<class T>
std::future< T > | get (std::function< T()> &&cb)
template<class T>
std::shared_future< T > | getShared (std::function< T()> &&cb)
void | stop (bool wait=true)
void | join ()
void | detach ()

## Static Public Member Functions
static ThreadPool & | computation ()
static ThreadPool & | io ()

## Detailed Description

Definition at line 17 of file thread_pool.h.

## Member Function Documentation

## ◆ get()

template<class T>

std::future< T > dht::ThreadPool::get | ( | std::function< T()> && | cb | ) |
| inline

Definition at line 30 of file thread_pool.h.

## ◆ getShared()

template<class T>

std::shared_future< T > dht::ThreadPool::getShared | ( | std::function< T()> && | cb | ) |
| inline

Definition at line 46 of file thread_pool.h.

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

- /home/noptrix/ba/blackarch/packages/opendht-c/src/opendht/include/opendht/thread_pool.h