Namespaces | Classes | Typedefs | Functions
boost::threadpool Namespace Reference

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 Documentation

Fifo pool.

The pool's tasks are fifo scheduled task_func functors.

Definition at line 202 of file pool.hpp.

Lifo pool.

The pool's tasks are lifo scheduled task_func functors.

Definition at line 210 of file pool.hpp.

A standard pool.

The pool's tasks are fifo scheduled task_func functors.

Definition at line 226 of file pool.hpp.

Pool for prioritized task.

The pool's tasks are prioritized prio_task_func functors.

Definition at line 218 of file pool.hpp.

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 ().

See also:
boost function library

Definition at line 37 of file task_adaptors.hpp.


Function Documentation

template<typename Pool , typename Runnable >
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)).

Parameters:
\paramobj The Runnable object. The member function run() will be exectued and should not throw execeptions.
Returns:
true, if the task could be scheduled and false otherwise.

Definition at line 36 of file pool_adaptors.hpp.

template<typename Pool >
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.

Parameters:
taskThe task function object.

Definition at line 49 of file pool_adaptors.hpp.

template<typename Pool >
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.

template<class Pool , class Function >
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.



or_libs
Author(s): raphael
autogenerated on Mon Oct 6 2014 02:53:18