#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.
| forpy::threading::thread_pool::thread_pool |
( |
| ) |
|
|
inline |
| forpy::threading::thread_pool::thread_pool |
( |
int |
nThreads | ) |
|
|
inline |
| forpy::threading::thread_pool::~thread_pool |
( |
| ) |
|
|
inline |
| forpy::threading::thread_pool::thread_pool |
( |
const thread_pool & |
| ) |
|
|
privatedelete |
| forpy::threading::thread_pool::thread_pool |
( |
thread_pool && |
| ) |
|
|
privatedelete |
| void forpy::threading::thread_pool::clear_queue |
( |
| ) |
|
|
inline |
| std::thread& forpy::threading::thread_pool::get_thread |
( |
int |
i | ) |
|
|
inline |
| void forpy::threading::thread_pool::init |
( |
| ) |
|
|
inline |
| int forpy::threading::thread_pool::n_idle |
( |
| ) |
|
|
inline |
| std::function<void(INFOT)> forpy::threading::thread_pool::pop |
( |
| ) |
|
|
inline |
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.
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.
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.
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.
| void forpy::threading::thread_pool::resize |
( |
int |
nThreads | ) |
|
|
inline |
| void forpy::threading::thread_pool::set_thread |
( |
int |
i | ) |
|
|
inlineprivate |
| int forpy::threading::thread_pool::size |
( |
| ) |
|
|
inline |
| void forpy::threading::thread_pool::stop |
( |
bool |
isWait = false | ) |
|
|
inline |
| std::condition_variable forpy::threading::thread_pool::cv |
|
private |
| std::vector<std::shared_ptr<std::atomic<bool> > > forpy::threading::thread_pool::flags |
|
private |
| std::atomic<bool> forpy::threading::thread_pool::isDone |
|
private |
| std::atomic<bool> forpy::threading::thread_pool::isStop |
|
private |
| std::mutex forpy::threading::thread_pool::mutex |
|
private |
| std::atomic<int> forpy::threading::thread_pool::nWaiting |
|
private |
| std::vector<std::unique_ptr<std::thread> > forpy::threading::thread_pool::threads |
|
private |
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/forpy/checkouts/latest/include/forpy/util/threading/ctpl.h