threadpool Overview | Reference | Tutorial | Examples | Design
Reference Class List | Member Functions | Typedefs | File List

boost::threadpool Namespace Reference


Classes

class  future
 Experimental. Do not use in production code. TODO. More...
struct  empty_controller
 SizePolicyController which provides no functionality. More...
class  fifo_scheduler
 SchedulingPolicy which implements FIFO ordering. 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
typedef thread_pool< task_func,
lifo_scheduler, static_size,
resize_controller, wait_for_all_tasks
lifo_pool
typedef fifo_pool pool
typedef thread_pool< prio_task_func,
prio_scheduler, static_size,
resize_controller, wait_for_all_tasks
prio_pool
typedef function0< void > task_func

Functions

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<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, typename Runnable>
bool schedule (Pool &pool, shared_ptr< Runnable > const &obj)
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

typedef thread_pool<task_func, fifo_scheduler, static_size, resize_controller, wait_for_all_tasks> boost::threadpool::fifo_pool
 

Fifo pool.

The pool's tasks are fifo scheduled task_func functors.

Definition at line 202 of file pool.hpp.

typedef thread_pool<task_func, lifo_scheduler, static_size, resize_controller, wait_for_all_tasks> boost::threadpool::lifo_pool
 

Lifo pool.

The pool's tasks are lifo scheduled task_func functors.

Definition at line 210 of file pool.hpp.

typedef fifo_pool boost::threadpool::pool
 

A standard pool.

The pool's tasks are fifo scheduled task_func functors.

Definition at line 226 of file pool.hpp.

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.

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>
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<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:
task The task function object.

Definition at line 49 of file pool_adaptors.hpp.

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:
\param obj 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<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.


Copyright © 2005-2008 Philipp Henkel Overview | Reference | Tutorial | Examples | Design

Hosted by SourceForge.net Logo