OnixS C++ FIX Engine  4.2.0
API Documentation
Thread Class Referenceabstract

#include <OnixS/FIXEngine/Threading/Thread.h>

Public Member Functions

 Thread (const std::string &name)
 
virtual ~Thread ()
 
void start ()
 
void stopAsync ()
 
bool stopRequested () const
 
void join () const
 
ThreadId id () const
 

Detailed Description

Custom thread classes should derive from this class and implement 'run' method.

Definition at line 101 of file Thread.h.

Constructor & Destructor Documentation

Thread ( const std::string &  name)
explicit

Creates the Thread object without running a real thread.

virtual ~Thread ( )
virtual

Cleans up internal resources.

Note
Calls std::terminate if the thread is not stopped at the moment.

Member Function Documentation

ThreadId id ( ) const

Returns platform identifier.

void join ( ) const

Joins the thread completion.

void start ( )

Creates and runs an actual thread.

Can be called only once for the current 'Thread' instance.

Exceptions
std::exceptionif the thread is started or joined already.
void stopAsync ( )

Sends a stop signal to the thread.

bool stopRequested ( ) const

Returns 'true' if a stop signal is sent to the thread by the stopAsync method or in a different way, otherwise 'false'.


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