VPTissue Reference Manual
SimPT_Parex::WorkerPool Class Reference

A pool handling the workers that will do the actual work. More...

#include <WorkerPool.h>

Inheritance diagram for SimPT_Parex::WorkerPool:
Inheritance graph
Collaboration diagram for SimPT_Parex::WorkerPool:
Collaboration graph

Public Slots

void MakeProcessAvailable (QObject *)
 When a worker has finished his work, this slot should be fired.
 
void MakeProcessAvailable (WorkerRepresentative *)
 
void ReleaseWorker (QObject *)
 When a worker disconnects, this slot should be fired.
 
void ReleaseWorker (WorkerRepresentative *)
 

Signals

void NewWorkerAvailable ()
 Emitted when a worker is ready for work.
 
void WorkerReconnected (WorkerRepresentative *)
 Emitted when a worker has reconnected after being disconnected.
 

Public Member Functions

void Delete (std::string name)
 Delete an exploration on every node.
 
WorkerRepresentativegetProcess ()
 Gets a process doing nothing if one is available, otherwise returns 0. More...
 
void SetMinNumWorkers (int)
 Set the minimum number of workers.
 
bool WorkerAvailable ()
 Checks to see if a worker is ready to do some work.
 

Static Public Member Functions

static WorkerPoolglobalInstance ()
 A static method to get the instance of the workerPool. More...
 

Detailed Description

A pool handling the workers that will do the actual work.

Definition at line 37 of file WorkerPool.h.

Member Function Documentation

WorkerRepresentative * SimPT_Parex::WorkerPool::getProcess ( )

Gets a process doing nothing if one is available, otherwise returns 0.

This makes the worker unavailable for others, so be sure to give him work.

Definition at line 196 of file WorkerPool.cpp.

WorkerPool * SimPT_Parex::WorkerPool::globalInstance ( )
static

A static method to get the instance of the workerPool.

Workers broadcasting their location will only be picked up after this has been called at least once!

Definition at line 186 of file WorkerPool.cpp.

Referenced by SimPT_Parex::Server::Server().

Here is the caller graph for this function:


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