Lines Matching defs:worker

10 /// This file implements the worker threads (or thread pool) design
43 /// to be performed. Associated to that queue are a set of worker
49 /// executes the instructions it carries. We say the worker thread
52 /// When the worker thread is done performing the @ref task, the
59 /// By default, the number of worker threads is equal to the number of
78 /// The abstraction of a worker thread.
81 /// interface type of this worker thread design pattern.
82 struct worker
86 worker()
92 }; // end struct worker
94 // </worker declarations>
101 // A boolean to say if the user wants to shutdown the worker
106 // The number of worker threads.
112 // worker threads sleep until a new task is added to the queue of
136 // A vector of the worker threads.
137 std::vector<worker> workers;
141 /// @param nb_workers the number of worker threads to have in the
145 /// worker thread which has performed the task, right after it's
158 /// Create the worker threads pool and have all threads sit idle,
165 worker w;
168 (void*(*)(void*))&worker::wait_to_execute_a_task,
223 /// worker threads to finish their tasks, and end their execution.
246 for (std::vector<worker>::const_iterator i = workers.begin();
264 /// By default the queue is created with a number of worker threaders
273 /// @param number_of_workers the number of worker threads to have in
281 /// @param number_of_workers the number of worker threads to have in
330 /// Suspends the current thread until all worker threads finish
333 /// If the worker threads were suspended waiting for a new task to
364 // <worker definitions>
376 worker::wait_to_execute_a_task(queue::priv* p)
428 // </worker definitions>