|
Lockless Task Scheduler
v1.0a
A lockless task scheduler
|
Struct base_thread More...
#include <thread.h>


Public Types | |
| typedef base_task_graph< TMemInterface > | task_graph_type |
| typedef base_task< TMemInterface >::task_type | task_type |
| typedef task_graph_type::task_queue_type | task_queue_type |
| typedef base_thread< TMemInterface > | thread_type |
| typedef base_thread_pool< TMemInterface > | thread_pool |
| typedef task_graph_type::task_memory_allocator_type | task_memory_allocator_type |
| typedef thread_index_t< TMemInterface > | thread_index_type |
| typedef task_graph_type::task_vector | task_vector |
Public Member Functions | |
| base_thread (thread_num_t _thread_index, thread_pool *_pool) | |
| Initializes a new instance of the base_thread<TMemInterface> struct. More... | |
| ~base_thread () | |
| Finalizes an instance of the base_thread<TMemInterface> class. More... | |
| void | sleep (bool(thread_type::*_wake_up)()) |
| Sleeps the specified wake up. More... | |
| void | wake_up () |
| Wakes up. More... | |
| void | join () |
| Joins this instance. More... | |
Static Public Member Functions | |
| static thread_type * | create_thread (thread_pool *_pool) |
| Creates the thread. More... | |
Public Attributes | |
| task_queue_type * | task_queue [task_type::num_priority] |
| thread_index_type | thread_index |
| The task queue More... | |
| std::thread::id | thread_id |
| The thread identifier More... | |
| std::thread | task_thread |
| The task thread More... | |
| task_memory_allocator_type | allocator |
| The allocator More... | |
Friends | |
| class | std::thread |
| template<class TMemInterface > | |
| class | base_thread_pool |
Struct base_thread
| task_scheduler::base_thread< TMemInterface >::base_thread | ( | thread_num_t | _thread_index, |
| thread_pool * | _pool | ||
| ) |
Initializes a new instance of the base_thread<TMemInterface> struct.
| _thread_index | Index of the thread. |
| _pool | The pool. |
| task_scheduler::base_thread< TMemInterface >::~base_thread | ( | ) |
Finalizes an instance of the base_thread<TMemInterface> class.
|
static |
Creates the thread.
| _pool | The pool. |
| void task_scheduler::base_thread< TMemInterface >::join | ( | ) |
Joins this instance.
| void task_scheduler::base_thread< TMemInterface >::sleep | ( | bool(thread_type::*)() | _wake_up | ) |
Sleeps the specified wake up.
| _wake_up | The wake up. |
| void task_scheduler::base_thread< TMemInterface >::wake_up | ( | ) |
Wakes up.
| task_memory_allocator_type task_scheduler::base_thread< TMemInterface >::allocator |
The allocator
| std::thread task_scheduler::base_thread< TMemInterface >::task_thread |
The task thread
| std::thread::id task_scheduler::base_thread< TMemInterface >::thread_id |
The thread identifier
| thread_index_type task_scheduler::base_thread< TMemInterface >::thread_index |
The task queue
1.8.13