#include <ctpl.h>
|
| thread_pool () |
|
| thread_pool (int nThreads) |
|
| ~thread_pool () |
|
int | size () |
|
int | n_idle () |
|
std::thread & | get_thread (int i) |
|
void | resize (int nThreads) |
|
void | clear_queue () |
|
std::function< void(INFOT)> | pop () |
|
void | stop (bool isWait=false) |
|
template<typename C , typename F , typename M , typename... Rest> |
auto | push_move (F &&f, C *c, M &&movable, Rest &&... rest) -> std::future< decltype((c-> *f)(new forpy::Desk(0), movable, rest...))> |
| For member functions (with parameters). More...
|
|
template<typename C , typename F , typename... Rest> |
auto | push (F &&f, C *c, Rest &&... rest) -> std::future< decltype((c-> *f)(new forpy::Desk(0), rest...))> |
| For member functions (with parameters). More...
|
|
template<typename F , typename... Rest> |
auto | push (F &&f, Rest &&... rest) -> std::future< decltype(f(new forpy::Desk(0), rest...))> |
| For functions with parameters. More...
|
|
template<typename F > |
auto | push (F &&f) -> std::future< decltype(f(new forpy::Desk(0)))> |
| For functions without parameters. More...
|
|
void | init () |
|
Definition at line 75 of file ctpl.h.
◆ thread_pool() [1/4]
forpy::threading::thread_pool::thread_pool |
( |
| ) |
|
|
inline |
◆ thread_pool() [2/4]
forpy::threading::thread_pool::thread_pool |
( |
int |
nThreads | ) |
|
|
inline |
◆ ~thread_pool()
forpy::threading::thread_pool::~thread_pool |
( |
| ) |
|
|
inline |
◆ thread_pool() [3/4]
forpy::threading::thread_pool::thread_pool |
( |
const thread_pool & |
| ) |
|
|
privatedelete |
◆ thread_pool() [4/4]
forpy::threading::thread_pool::thread_pool |
( |
thread_pool && |
| ) |
|
|
privatedelete |
◆ clear_queue()
void forpy::threading::thread_pool::clear_queue |
( |
| ) |
|
|
inline |
◆ get_thread()
std::thread& forpy::threading::thread_pool::get_thread |
( |
int |
i | ) |
|
|
inline |
◆ init()
void forpy::threading::thread_pool::init |
( |
| ) |
|
|
inline |
◆ n_idle()
int forpy::threading::thread_pool::n_idle |
( |
| ) |
|
|
inline |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ pop()
std::function<void(INFOT)> forpy::threading::thread_pool::pop |
( |
| ) |
|
|
inline |
◆ push() [1/3]
template<typename C , typename F , typename... Rest>
auto forpy::threading::thread_pool::push |
( |
F && |
f, |
|
|
C * |
c, |
|
|
Rest &&... |
rest |
|
) |
| -> std::future<decltype((c->*f)(new forpy::Desk(0), rest...))> |
|
inline |
For member functions (with parameters).
Definition at line 194 of file ctpl.h.
◆ push() [2/3]
template<typename F , typename... Rest>
auto forpy::threading::thread_pool::push |
( |
F && |
f, |
|
|
Rest &&... |
rest |
|
) |
| -> std::future<decltype(f(new forpy::Desk(0), rest...))> |
|
inline |
For functions with parameters.
Definition at line 209 of file ctpl.h.
◆ push() [3/3]
template<typename F >
auto forpy::threading::thread_pool::push |
( |
F && |
f | ) |
-> std::future<decltype(f(new forpy::Desk(0)))> |
|
inline |
For functions without parameters.
Definition at line 224 of file ctpl.h.
◆ push_move()
template<typename C , typename F , typename M , typename... Rest>
auto forpy::threading::thread_pool::push_move |
( |
F && |
f, |
|
|
C * |
c, |
|
|
M && |
movable, |
|
|
Rest &&... |
rest |
|
) |
| -> std::future<decltype((c->*f)(new forpy::Desk(0), movable, rest...))> |
|
inline |
For member functions (with parameters).
Definition at line 178 of file ctpl.h.
◆ resize()
void forpy::threading::thread_pool::resize |
( |
int |
nThreads | ) |
|
|
inline |
◆ set_thread()
void forpy::threading::thread_pool::set_thread |
( |
int |
i | ) |
|
|
inlineprivate |
◆ size()
int forpy::threading::thread_pool::size |
( |
| ) |
|
|
inline |
◆ stop()
void forpy::threading::thread_pool::stop |
( |
bool |
isWait = false | ) |
|
|
inline |
◆ cv
std::condition_variable forpy::threading::thread_pool::cv |
|
private |
◆ flags
std::vector<std::shared_ptr<std::atomic<bool> > > forpy::threading::thread_pool::flags |
|
private |
◆ isDone
std::atomic<bool> forpy::threading::thread_pool::isDone |
|
private |
◆ isStop
std::atomic<bool> forpy::threading::thread_pool::isStop |
|
private |
◆ mutex
std::mutex forpy::threading::thread_pool::mutex |
|
private |
◆ nWaiting
std::atomic<int> forpy::threading::thread_pool::nWaiting |
|
private |
◆ threads
std::vector<std::unique_ptr<std::thread> > forpy::threading::thread_pool::threads |
|
private |
The documentation for this class was generated from the following file:
- /Users/classner/git/forpy/include/forpy/util/threading/ctpl.h