Namespaces | |
namespace | detail |
Classes | |
struct | empty_controller |
SizePolicyController which provides no functionality. More... | |
class | fifo_scheduler |
SchedulingPolicy which implements FIFO ordering. More... | |
class | future |
Experimental. Do not use in production code. TODO. More... | |
class | immediately |
ShutdownPolicy which does not wait for any tasks or worker termination. More... | |
class | lifo_scheduler |
SchedulingPolicy which implements LIFO ordering. More... | |
class | looped_task_func |
Looped task function object. More... | |
class | prio_scheduler |
SchedulingPolicy which implements prioritized ordering. More... | |
class | prio_task_func |
Prioritized task function object. More... | |
class | resize_controller |
SizePolicyController which allows resizing. More... | |
class | static_size |
SizePolicy which preserves the thread count. More... | |
class | thread_pool |
Thread pool. More... | |
class | wait_for_active_tasks |
ShutdownPolicy which waits for the completion of all active tasks and the worker termination afterwards. More... | |
class | wait_for_all_tasks |
ShutdownPolicy which waits for the completion of all tasks and the worker termination afterwards. More... | |
Typedefs | |
typedef thread_pool< task_func, fifo_scheduler, static_size, resize_controller, wait_for_all_tasks > | fifo_pool |
Fifo pool. | |
typedef thread_pool< task_func, lifo_scheduler, static_size, resize_controller, wait_for_all_tasks > | lifo_pool |
Lifo pool. | |
typedef fifo_pool | pool |
A standard pool. | |
typedef thread_pool < prio_task_func, prio_scheduler, static_size, resize_controller, wait_for_all_tasks > | prio_pool |
Pool for prioritized task. | |
typedef function0< void > | task_func |
Standard task function object. | |
Functions | |
template<typename Pool , typename Runnable > | |
bool | schedule (Pool &pool, shared_ptr< Runnable > const &obj) |
template<typename Pool > | |
enable_if< is_void< typename result_of< typename Pool::task_type() >::type > , bool >::type | schedule (Pool &pool, typename Pool::task_type const &task) |
template<typename Pool > | |
enable_if< is_void< typename result_of< typename Pool::task_type() >::type > , bool >::type | schedule (shared_ptr< Pool > const pool, typename Pool::task_type const &task) |
template<class Pool , class Function > | |
disable_if< is_void< typename result_of< Function() >::type > , future< typename result_of < Function() >::type >>::type | schedule (Pool &pool, const Function &task) |
typedef fifo_pool boost::threadpool::pool |
typedef thread_pool<prio_task_func, prio_scheduler, static_size, resize_controller, wait_for_all_tasks> boost::threadpool::prio_pool |
Pool for prioritized task.
The pool's tasks are prioritized prio_task_func functors.
typedef function0<void> boost::threadpool::task_func |
Standard task function object.
This function object wraps a nullary function which returns void. The wrapped function is invoked by calling the operator ().
Definition at line 37 of file task_adaptors.hpp.
bool boost::threadpool::schedule | ( | Pool & | pool, |
shared_ptr< Runnable > const & | obj | ||
) |
Schedules a Runnable for asynchronous execution. A Runnable is an arbitrary class with a run() member function. This a convenience shorthand for pool->schedule(bind(&Runnable::run, task_object)).
\param | obj The Runnable object. The member function run() will be exectued and should not throw execeptions. |
Definition at line 36 of file pool_adaptors.hpp.
enable_if< is_void< typename result_of< typename Pool::task_type() >::type >, bool >::type boost::threadpool::schedule | ( | Pool & | pool, |
typename Pool::task_type const & | task | ||
) |
Schedules a task for asynchronous execution. The task will be executed once only.
task | The task function object. |
Definition at line 49 of file pool_adaptors.hpp.
enable_if< is_void< typename result_of< typename Pool::task_type() >::type >, bool >::type boost::threadpool::schedule | ( | shared_ptr< Pool > const | pool, |
typename Pool::task_type const & | task | ||
) |
Definition at line 60 of file pool_adaptors.hpp.
disable_if< is_void< typename result_of< Function() >::type >, future< typename result_of< Function() >::type >>::type boost::threadpool::schedule | ( | Pool & | pool, |
const Function & | task | ||
) |
Definition at line 111 of file future.hpp.