GridComputing
Job Management in Grid Computing
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Runnable Class Referenceabstract

Runnable abstract Class. More...

#include <runnable.h>

Inheritance diagram for Runnable:
GridNetwork

Public Member Functions

 Runnable ()
 Constructor.
 
virtual ~Runnable ()
 Destructor. Stops thread.
 
void Stop ()
 Stops thread.
 
void Start ()
 Starts thread.
 

Protected Member Functions

virtual void Run ()=0
 Method to execute when thread is started.
 

Protected Attributes

std::atomic< bool > _stop
 True if the thread should be stopped.
 

Private Member Functions

 Runnable (Runnable const &)
 
Runnableoperator= (Runnable const &)
 

Private Attributes

std::thread _thread
 The thread.
 

Detailed Description

Runnable abstract Class.

Represents a class that can be used in a multithreaded way

Constructor & Destructor Documentation

Runnable::Runnable ( )

Constructor.

virtual Runnable::~Runnable ( )
virtual

Destructor. Stops thread.

Runnable::Runnable ( Runnable const &  )
private

Member Function Documentation

Runnable& Runnable::operator= ( Runnable const &  )
private
virtual void Runnable::Run ( )
protectedpure virtual

Method to execute when thread is started.

Implemented in GridNetwork.

void Runnable::Start ( )

Starts thread.

void Runnable::Stop ( )

Stops thread.

Member Data Documentation

std::atomic<bool> Runnable::_stop
protected

True if the thread should be stopped.

std::thread Runnable::_thread
private

The thread.


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