OMOSThread class

The OMThread class in the execution framework aggregates OMOSThread to provide the basic threading features. The operating system factory's createOMOSThread method creates a raw thread. No constructor is declared for OMOSThread because any C++ compiler knows how to add a constructor if it not defined explicitly.

OMOSThread has the following static constant variables, which provide default values for user-controllable parameters: stack size, message queue size, and thread priority. Each static variable can be initialized with constants whose values can vary depending on the operating system being targeted, as shown in the following table.

Static Constant Variables Initialization Constants
DefaultStackSize SMALL_STACK or DEFAULT_STACK
DefaultMessageQueueSize MQ_DEFAULT_SIZE
DefaultThreadPriority PRIORITY_HIGH, PRIORITY_NORMAL, or PRIORITY_LOW
Construction summary
~OMOSThread
Destroys the OMOSThread object
Method summary
exeOnMyThread
Determines whether the method was invoked from the same operating system thread as the one on which the object is running
getOsHandle
Retrieves the thread's operating system ID
getThreadEndClbk
Is a callback function that ends the current operating system thread
resume
Resumes a suspended thread
setEndOSThreadInDtor
Determines whether destruction of the OMOSThread class should kill the operating system thread associated with the class
setPriority
Sets the thread's operating system priority
start
Starts thread processing
suspend
Suspends the thread

Feedback