21 #include <boost/thread/mutex.hpp> 22 #include <boost/bind.hpp> 82 print(
" looped_task()\n");
89 print(
" task_int()\n");
106 size_t active_threads = tp.
active();
107 size_t pending_threads = tp.
pending();
108 size_t total_threads = tp.
size();
110 size_t dummy = active_threads + pending_threads + total_threads;
142 int main (
int ,
char *
const [])
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.