My Project 3.2.0
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 ThreadPoolcomputation ()
 
static ThreadPoolio ()
 

Detailed Description

Definition at line 34 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 46 of file thread_pool.h.

◆ getShared()

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

Definition at line 60 of file thread_pool.h.


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