nidas
v1.2-1520
|
#include <Thread.h>
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... | |
|
inlinevirtual |
|
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().
|
pure virtual |
Interrupt this run method.
This sets a flag which can be tested with isInterrupted(). It is up to the run() implementation to return when interrupted.
Implemented in nidas::util::McSocketMulticaster< SocketTT >, nidas::util::ThreadRunnable, nidas::util::McSocketListener, nidas::core::ServerSocket::ConnectionThread, nidas::util::Thread, nidas::core::Socket::ConnectionThread, nidas::dynld::RawSampleService::Worker, nidas::dynld::UDPSampleOutput::XMLSocketListener, nidas::core::SensorHandler, nidas::core::SampleSorter, nidas::core::SampleBuffer, nidas::dynld::isff::GOESOutput, nidas::dynld::UDPSampleOutput::VariableListWorker, nidas::dynld::raf::SyncServer, nidas::core::DerivedDataReader, nidas::core::SensorOpener, nidas::dynld::XMLConfigService::Worker, nidas::core::SampleOutputRequestThread, and nidas::core::XmlRpcThread.
Referenced by nidas::util::ThreadRunnable::interrupt().
|
pure virtual |
Has the run method been interrupted?
Implemented in nidas::util::Thread, and nidas::dynld::isff::GOESOutput.
|
pure virtual |
The method which will run in its own thread.
This method must be supplied by the Runnable or Thread subclass.
Implemented in nidas::util::ThreadJoiner, nidas::util::McSocketMulticaster< SocketTT >, nidas::util::ThreadRunnable, nidas::util::McSocketListener, ServerThread, nidas::core::ServerSocket::ConnectionThread, WriterThread, nidas::core::SampleSorter, nidas::core::SampleBuffer, nidas::core::Socket::ConnectionThread, ModemLineMonitor, ModemLineSetter, nidas::dynld::RawSampleService::Worker, nidas::dynld::UDPSampleOutput::XMLSocketListener, nidas::core::DSMServerStat, nidas::core::FsMountWorkerThread, nidas::core::SensorHandler, nidas::dynld::UDPSampleOutput::ConnectionMonitor, nidas::dynld::isff::GOESOutput, nidas::dynld::UDPSampleOutput::VariableListWorker, nidas::core::DSMEngineStat, TestSource, PSI, Sender, nidas::dynld::raf::SyncServer, nidas::core::Looper, nidas::core::SensorOpener, nidas::dynld::XMLConfigService::Worker, nidas::core::DSMServerIntf, nidas::core::DerivedDataReader, DataWriter, nidas::core::SampleOutputRequestThread, nidas::core::StatusListener, and nidas::core::DSMEngineIntf.
Referenced by nidas::util::Thread::pRun(), nidas::util::ThreadRunnable::run(), and nidas::util::Thread::test().
|
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.