16 #include <boost/bind.hpp> 17 #include <boost/thread/mutex.hpp> 55 print(
" task_4()\n" );
64 print(
" looped_task()\n" );
70 print(
" task_int()\n" );
85 size_t active_threads = tp.
active();
86 size_t pending_threads = tp.
pending();
87 size_t total_threads = tp.
size();
89 size_t dummy = active_threads + pending_threads + total_threads;
void wait(size_t task_threshold=0) const
The current thread of execution is blocked until the sum of all active and pending tasks is equal or ...
void task_with_parameter(int value)
bool schedule(task_type const &task)
Schedules a task for asynchronous execution.
bool empty() const
Indicates that there are no tasks pending.
size_t pending() const
Returns the number of tasks which are ready for execution.
disable_if< is_void< typename result_of< Function() >::type >, future< typename result_of< Function() >::type >>::type schedule(Pool &pool, const Function &task)
size_t active() const
Returns the number of tasks which are currently executed.
size_controller_type size_controller()
Gets the size controller which manages the number of threads in the pool.
int main(int, char *const [])
void clear()
Removes all pending tasks from the pool's scheduler.
Prioritized task function object.
boost::mutex m_io_monitor
size_t size() const
Gets the number of threads in the pool.