|
MADNESS 0.10.1
|
ThreadPool thread object.
More...
#include <thread.h>


Public Member Functions | |
| ThreadPoolThread () | |
| virtual | ~ThreadPoolThread ()=default |
| profiling::TaskProfiler & | profiler () |
| Task profiler accessor. | |
Public Member Functions inherited from madness::Thread | |
| Thread () | |
| Default constructor. | |
| Thread (void *(*f)(void *), void *args=nullptr) | |
Create a thread and start it running f(args). | |
| virtual | ~Thread ()=default |
| void | start (void *(*f)(void *), void *args=nullptr) |
Start the thread by running f(args). | |
Public Member Functions inherited from madness::ThreadBase | |
| ThreadBase () | |
| Default constructor. | |
| virtual | ~ThreadBase () |
| int | cancel () const |
| Cancel this thread. | |
| const pthread_t & | get_id () const |
| Get the pthread id of this thread (if running). | |
| int | get_pool_thread_index () const |
Get index of this thread in ThreadPool. | |
| void | start () |
| Start the thread running. | |
Private Attributes | |
| profiling::TaskProfiler | profiler_ |
Additional Inherited Members | |
Static Public Member Functions inherited from madness::ThreadBase | |
| static void | exit () |
| A thread can call this to terminate its execution. | |
| static int | num_hw_processors () |
| Get number of actual hardware processors. | |
| static ThreadBase * | this_thread () |
ThreadPool thread object.
This class holds thread local data for thread pool threads. It can be accessed via ThreadBase::this_thread().
|
inline |
|
virtualdefault |
|
inline |
Task profiler accessor.
References profiler_.
Referenced by madness::ThreadPool::end(), madness::ThreadPool::run_task(), and madness::ThreadPool::run_tasks().
|
private |
Referenced by profiler().