|
Geant4
10.07
|
The task class is supplied to thread_pool. More...
Public Types | |
| typedef void | RetT |
| typedef Task< void, void > | this_type |
| typedef std::promise< RetT > | promise_type |
| typedef std::future< RetT > | future_type |
| typedef std::packaged_task< RetT()> | packaged_task_type |
| typedef RetT | result_type |
Public Types inherited from VTask | |
| typedef std::thread::id | tid_type |
| typedef size_t | size_type |
| typedef VTask | this_type |
| typedef std::atomic_uintmax_t | count_t |
| typedef VTask * | iterator |
| typedef const VTask * | const_iterator |
| typedef std::function< void()> | void_func_t |
Public Member Functions | |
| template<typename FuncT > | |
| Task (FuncT &&func) | |
| template<typename FuncT > | |
| Task (VTaskGroup *tg, FuncT &&func) | |
| template<typename FuncT > | |
| Task (ThreadPool *tp, FuncT &&func) | |
| virtual | ~Task () |
| virtual void | operator() () final |
| virtual bool | is_native_task () const override |
| future_type | get_future () |
Public Member Functions inherited from VTask | |
| VTask () | |
| VTask (VTaskGroup *task_group) | |
| VTask (ThreadPool *pool) | |
| virtual | ~VTask () |
| void | operator-- () |
| virtual ThreadPool * | pool () const |
| VTaskGroup * | group () const |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| const_iterator | cbegin () const |
| const_iterator | cend () const |
| intmax_t & | depth () |
| const intmax_t & | depth () const |
Private Attributes | |
| packaged_task_type | m_ptask |
Additional Inherited Members | |
Static Protected Member Functions inherited from VTask | |
| static tid_type | this_tid () |
Protected Attributes inherited from VTask | |
| intmax_t | m_depth |
| VTaskGroup * | m_group |
| ThreadPool * | m_pool |
| void_func_t | m_func = []() {} |
The task class is supplied to thread_pool.
| typedef std::promise<RetT> promise_type |
| typedef std::future<RetT> future_type |
| typedef std::packaged_task<RetT()> packaged_task_type |
| typedef RetT result_type |
|
explicit |
| Task | ( | VTaskGroup * | tg, |
| FuncT && | func | ||
| ) |
| Task | ( | ThreadPool * | tp, |
| FuncT && | func | ||
| ) |
|
virtual |
|
finalvirtual |
Implements VTask.
References Task< RetT, Args >::m_ptask, and VTask::operator--().
|
overridevirtual |
Reimplemented from VTask.
| future_type get_future | ( | ) |
References Task< RetT, Args >::m_ptask.
|
private |