Runs multiple threads using a simple batch queue model. More...

#include <BatchQueue.h>

Public Member Functions

 BatchQueue (unsigned nthread=0)
 Default constructor.
 ~BatchQueue ()
 Destructor.
void resize (unsigned nthread)
 Set the number of tasks that may run at one time.
void submit (Job *)
 Submit a job for processing.
template<class Class, typename Method>
void submit (Class *instance, Method method)
 Submit a job for processing.
template<class Class, typename Method, typename Argument>
void submit (Class *instance, Method method, Argument argument)
 Submit a job for processing.
template<class Class, typename Method, typename Arg1, typename Arg2>
void submit (Class *instance, Method method, Arg1 a1, Arg2 a2)
 Submit a job for processing.
void wait ()
 Wait for completion of all active jobs.

Protected Member Functions

void add (Job *)
 Add a job to the active list.
void remove (Job *)
 Remove a job from the active list.

Protected Attributes

ThreadContextcontext
 Mutual exclusion and condition variables used to coordinate the queue.
std::vector< Job * > active
 The active jobs.

Detailed Description

Runs multiple threads using a simple batch queue model.

Member Function Documentation

◆ submit()

void BatchQueue::submit ( Job * job)

Submit a job for processing.

Set the number of instances that may be solved simultaneously.

Referenced by submit(), submit(), and submit().


The documentation for this class was generated from the following files:

Generated using doxygen 1.14.0