nidas  v1.2-1520
Public Member Functions | Protected Member Functions | List of all members
nidas::util::Runnable Class Referenceabstract

#include <Thread.h>

Inheritance diagram for nidas::util::Runnable:
Inheritance graph
[legend]

Public Member Functions

virtual ~Runnable ()
 
virtual int run ()=0 throw (Exception)
 The method which will run in its own thread. More...
 
virtual void interrupt ()=0
 Interrupt this run method. More...
 
virtual bool isInterrupted () const =0
 Has the run method been interrupted? More...
 

Protected Member Functions

void testCancel () const
 Check if we have been cancelled. More...
 
virtual bool amInterrupted () const
 Call testCancel, and return true when this thread has been interrupted. More...
 

Constructor & Destructor Documentation

virtual nidas::util::Runnable::~Runnable ( )
inlinevirtual

Member Function Documentation

bool Runnable::amInterrupted ( ) const
protectedvirtual

Call testCancel, and return true when this thread has been interrupted.

This is protected because it should only called within the run method of the thread.

Referenced by nidas::core::SampleOutputRequestThread::run(), nidas::core::Looper::run(), nidas::dynld::isff::GOESOutput::run(), nidas::core::DSMServerStat::run(), and nidas::util::Thread::test().

virtual void nidas::util::Runnable::interrupt ( )
pure virtual
virtual bool nidas::util::Runnable::isInterrupted ( ) const
pure virtual

Has the run method been interrupted?

Implemented in nidas::util::Thread, and nidas::dynld::isff::GOESOutput.

virtual int nidas::util::Runnable::run ( )
throw (Exception
)
pure virtual
void nidas::util::Runnable::testCancel ( ) const
inlineprotected

Check if we have been cancelled.

Calls pthread_testcancel. This is protected since it only checks the current thread - i.e. it must be called within the run method. Since it just calls pthread_testcancel, it is a cancellation point.


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