Gecode::Support::RunJobs< Jobs, RetType >::Worker Class Reference

The actual worker using a thread to run a job. More...

`#include <run-jobs.hpp>`

## Public Member Functions

| Worker (Job< RetType > *j, Master *m, int i)
| Initialize worker.
virtual void | run (void)
| Run jobs.
virtual | ~Worker (void)
| Nothing to delete (done in run).
Public Member Functions inherited from Gecode::Support::Runnable
| Runnable (bool d=true)
| Initialize, d defines whether object is deleted when terminated.
void | todelete (bool d)
| Set whether to delete upon termination.
bool | todelete (void) const
| Return whether to be deleted upon termination.
virtual Terminator * | terminator (void) const
| Return terminator object.
virtual | ~Runnable (void)
| Destructor.

## Protected Attributes

Job< RetType > * | job
| The job to run.
Master * | master
| The master to communicate with.
int | idx
| Original iterator index of job.

## Additional Inherited Members

Static Public Member Functions inherited from Gecode::Support::Runnable
static void * | operator new (size_t s)
| Allocate memory from heap.
static void | operator delete (void *p)
| Free memory allocated from heap.

## Detailed Description

template<class Jobs, class RetType>
class Gecode::Support::RunJobs< Jobs, RetType >::Worker

The actual worker using a thread to run a job.

Definition at line 80 of file run-jobs.hpp.

## Constructor & Destructor Documentation

## Worker()

template<class Jobs, class RetType>

Gecode::Support::RunJobs< Jobs, RetType >::Worker::Worker | ( | Job< RetType > * | j,
|  | Master * | m,
|  | int | i )

inline

Initialize worker.

Definition at line 176 of file run-jobs.hpp.

## ~Worker()

template<class Jobs, class RetType>

Gecode::Support::RunJobs< Jobs, RetType >::Worker::~Worker | ( | void |  | ) |

virtual

Nothing to delete (done in run).

Definition at line 182 of file run-jobs.hpp.

## Member Function Documentation

## run()

template<class Jobs, class RetType>

void Gecode::Support::RunJobs< Jobs, RetType >::Worker::run | ( | void |  | ) |

virtual

Run jobs.

Implements Gecode::Support::Runnable.

Definition at line 237 of file run-jobs.hpp.

## Member Data Documentation

## job

template<class Jobs, class RetType>

Job<RetType>* Gecode::Support::RunJobs< Jobs, RetType >::Worker::job

protected

The job to run.

Definition at line 83 of file run-jobs.hpp.

## master

template<class Jobs, class RetType>

Master* Gecode::Support::RunJobs< Jobs, RetType >::Worker::master

protected

The master to communicate with.

Definition at line 85 of file run-jobs.hpp.

## idx

template<class Jobs, class RetType>

int Gecode::Support::RunJobs< Jobs, RetType >::Worker::idx

protected

Original iterator index of job.

Definition at line 87 of file run-jobs.hpp.

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

- gecode/support/run-jobs.hpp