B2BITS FIX Antenna HFT
1.0.16
|
A thread of execution in a program. More...
#include <Thread.h>
Public Types | |
typedef void(* | ThreadListener )(Thread *pthread) |
Public Member Functions | |
void | cancel () |
Requests that thread to be canceled. More... | |
bool | equals (ThreadId thrId) |
ThreadId | getId () const |
Returns thread's id. More... | |
std::string const & | getName () const |
Returns the thread's name. More... | |
void | join () |
Waits for this thread to terminate. More... | |
bool | join (unsigned int miliseconds) |
Waits for this thread to terminate. More... | |
void | setAffinity (u64 mask) throw () |
Sets CPU affinity. More... | |
void | setDestroyOnExit (bool needDestroyOnExit) |
Sets self-destroy thread mode Only has effect if called before start(). More... | |
void | start () |
Causes this thread to begin execution. More... | |
Thread (bool setExTranslator=true) | |
Constructor. More... | |
Thread (const char *pName, bool setExTranslator=true) | |
Constructor. More... | |
Thread (std::string aName, bool setExTranslator=true) | |
virtual | ~Thread () |
Destructor. More... | |
Static Public Member Functions | |
static void | callThreadStartListener (System::Thread *pthread) throw () |
static void | callThreadStopListener (System::Thread *pthread) throw () |
static ThreadListener | getThreadStartListener () throw () |
static ThreadListener | getThreadStopListener () throw () |
static ThreadId | self () |
Returns the thread ID of the calling thread. More... | |
static void | setCurrentThreadAffinity (u64 mask) |
static void | setName (char const *name) |
Gives name to the current thread. More... | |
static bool | setRealtime (u64 realtimePrio) |
static void | setThreadStartListener (ThreadListener listener) throw () |
static void | setThreadStopListener (ThreadListener listener) throw () |
static bool | sleep (unsigned int aMillis) |
Causes the currently executing thread to sleep for the specified number of milliseconds. More... | |
static void | yield () |
Causes the currently executing thread object to temporarily pause and allow other threads to execute. More... | |
Protected Types | |
enum | CancellationType { DISABLED, DEFERRED, ASYNCHRONOUS } |
Protected Member Functions | |
virtual void | run ()=0 |
Thread's start function. More... | |
void | setCancelMode (CancellationType aMode) |
Sets thread's cancellation mode. More... | |
A thread of execution in a program.
typedef void( * System::Thread::ThreadListener)(Thread *pthread) |
|
protected |
|
explicit |
Constructor.
When a new thread is created, it does not begin immediate execution.
setExTranslator | - valid for the Windows platform only. When true SEH exceptions will be translated into the Utils::Exception. |
SystemException |
|
explicit |
Constructor.
When a new thread is created, it does not begin immediate execution.
setExTranslator | - valid for the Windows platform only. When true SEH exceptions will be translated into the Utils::Exception. |
SystemException |
|
explicit |
|
virtual |
Destructor.
|
inlinestatic |
References getThreadStartListener().
|
inlinestatic |
References getThreadStopListener().
void System::Thread::cancel | ( | ) |
Requests that thread to be canceled.
Cancellation is asynchronous. Use join() to wait for termination of thread if necessary. You should never use cancellation unless you really want the target thread to go away. This is a termination mechanism.
SystemException |
bool System::Thread::equals | ( | ThreadId | thrId | ) |
|
inline |
Returns thread's id.
|
inline |
Returns the thread's name.
|
static |
Referenced by callThreadStartListener().
|
static |
Referenced by callThreadStopListener().
void System::Thread::join | ( | ) |
Waits for this thread to terminate.
SystemException |
bool System::Thread::join | ( | unsigned int | miliseconds | ) |
|
protectedpure virtual |
|
static |
Returns the thread ID of the calling thread.
void System::Thread::setAffinity | ( | u64 | mask | ) | |
throw | ( | ||||
) |
Sets CPU affinity.
There is no waranty for this method.
|
protected |
Sets thread's cancellation mode.
SystemException |
|
static |
void System::Thread::setDestroyOnExit | ( | bool | needDestroyOnExit | ) |
Sets self-destroy thread mode Only has effect if called before start().
|
static |
Gives name to the current thread.
name | New name |
|
static |
|
static |
|
static |
|
static |
Causes the currently executing thread to sleep for the specified number of milliseconds.
It is a cancellation point.
SystemException |
void System::Thread::start | ( | ) |
Causes this thread to begin execution.
SystemException |
|
static |
Causes the currently executing thread object to temporarily pause and allow other threads to execute.
SystemException |