s The Nana Programmer's Guide
Nana - a C++ framework project 

The Programmer's Guide 
nana::threads::pool_pusher<Function>

Description

A thread pool manages a group threads for a large number of tasks processing.

Model of

None

Public base classes

None

Template parameter

typename Function A function object type, prototype of function is void()

Typedefs

value_type A function object type. General speak, value_type is same with Function if Function is not a function prototype, otherwise value_type is a pointer type of function.


Members

pool_pusher(nana::threads::pool& pool_obj, const Function& fn) Creates a pool_pusher that inserts a fn task to the threadpool pool_obj.
void operator()() const Inters the task to the threadpool.

File

nana/threads/pool.hpp

Notes

1, pool_pusher also provides two helper function for easy use.

template<typename Function>
pool_pusher<Function> pool_push(nana::threads::pool& pool_obj, const Function& fn);

template<typename Class, typename Concept>
pool_pusher<nana::functor<void()> > pool_push(nana::threads::pool& pool_obj, Class& obj, void(Concept::*mf)());


See also

pool, A Method to prevent UI from blocking while busy


Move to The Nana Programmer's Guide Main Page