ldas-tools-al
2.6.6
|
#include <Thread.hh>
Classes | |
class | cancellation |
class | deadlock |
class | invalid_argument |
class | range_error |
class | Self |
Operates on current thread. More... | |
Public Member Functions | |
Thread () | |
virtual | ~Thread () |
virtual void | Cancel () |
void | CancellationCheck (const std::string &Header, const char *File, const int Line) const |
Deliver pending cancellation requests to the calling thread. More... | |
void | CancellationEnable (bool Value) |
cancel_type | CancellationType (signal_type &Signal) const |
Return the type of cancellation. More... | |
void | CancellationType (cancel_type Type, signal_type Signal=SignalHandler::SIGNAL_UNKNOWN) |
Establiosh the type of cancellation. More... | |
void | Detach () const |
virtual void | Join () |
bool | IsAlive () const |
bool | IsCancelled () const |
Return the cancellation state of the thread. More... | |
bool | IsDetached () const |
Reports detached state. More... | |
bool | IsParentThread () const |
int | Kill (signal_type Signal) const |
thread_type | ParentThread () const |
Retrieve key for parent thread. More... | |
virtual int | Spawn () |
void | SignalCapture (signal_type Sig) |
void | SignalIgnore (signal_type Sig) |
bool | operator== (const Thread &Source) const |
Thread () | |
virtual | ~Thread () |
virtual void | Cancel () |
void | CancellationCheck (const std::string &Header, const char *File, const int Line) const |
Deliver pending cancellation requests to the calling thread. More... | |
void | CancellationEnable (bool Value) |
cancel_type | CancellationType (signal_type &Signal) const |
Return the type of cancellation. More... | |
void | CancellationType (cancel_type Type, signal_type Signal=SignalHandler::SIGNAL_UNKNOWN) |
Establiosh the type of cancellation. More... | |
void | Detach () const |
virtual void | Join () |
bool | IsAlive () const |
bool | IsCancelled () const |
Return the cancellation state of the thread. More... | |
bool | IsDetached () const |
Reports detached state. More... | |
bool | IsParentThread () const |
int | Kill (signal_type Signal) const |
thread_type | ParentThread () const |
Retrieve key for parent thread. More... | |
virtual int | Spawn () |
void | SignalCapture (signal_type Sig) |
void | SignalIgnore (signal_type Sig) |
bool | operator== (const Thread &Source) const |
Thread () | |
virtual | ~Thread () |
virtual void | Cancel () |
void | CancellationCheck (const std::string &Header, const char *File, const int Line) const |
Deliver pending cancellation requests to the calling thread. More... | |
void | CancellationEnable (bool Value) |
cancel_type | CancellationType (signal_type &Signal) const |
Return the type of cancellation. More... | |
void | CancellationType (cancel_type Type, signal_type Signal=SignalHandler::SIGNAL_UNKNOWN) |
Establiosh the type of cancellation. More... | |
void | Detach () const |
virtual void | Join () |
bool | IsAlive () const |
bool | IsCancelled () const |
Return the cancellation state of the thread. More... | |
bool | IsDetached () const |
Reports detached state. More... | |
bool | IsParentThread () const |
int | Kill (signal_type Signal) const |
thread_type | ParentThread () const |
Retrieve key for parent thread. More... | |
virtual int | Spawn () |
void | SignalCapture (signal_type Sig) |
void | SignalIgnore (signal_type Sig) |
bool | operator== (const Thread &Source) const |
Static Public Member Functions | |
static void | SelfCancellationCheck (const std::string &Header, const char *File, const int Line) |
static size_t | StackSizeDefault () |
static void | StackSizeDefault (size_t StackSize) |
static void | SelfCancellationCheck (const std::string &Header, const char *File, const int Line) |
static size_t | StackSizeDefault () |
static void | StackSizeDefault (size_t StackSize) |
static void | SelfCancellationCheck (const std::string &Header, const char *File, const int Line) |
static size_t | StackSizeDefault () |
static void | StackSizeDefault (size_t StackSize) |
Protected Types | |
typedef void *(* | start_function_type) (void *) |
typedef void *(* | start_function_type) (void *) |
typedef void *(* | start_function_type) (void *) |
Protected Member Functions | |
virtual void | action ()=0 |
Job to be acomplished by the thread. More... | |
int | spawn (start_function_type StartFunction=(start_function_type) start_routine) |
Spawn a new thread. More... | |
thread_type | threadId () const |
virtual void | action ()=0 |
Job to be acomplished by the thread. More... | |
int | spawn (start_function_type StartFunction=(start_function_type) start_routine) |
Spawn a new thread. More... | |
thread_type | threadId () const |
virtual void | action ()=0 |
Job to be acomplished by the thread. More... | |
int | spawn (start_function_type StartFunction=(start_function_type) start_routine) |
Spawn a new thread. More... | |
thread_type | threadId () const |
Static Protected Member Functions | |
static void | cancelCleanup (Thread *Source) |
Perform cleanup of a cancelled thread. More... | |
static void | cancelCleanup (Thread *Source) |
Perform cleanup of a cancelled thread. More... | |
static void | cancelCleanup (Thread *Source) |
Perform cleanup of a cancelled thread. More... | |
Private Member Functions | |
void | cancellation_enable (bool Value) |
void | set_cancelled_state () |
void | cancellation_enable (bool Value) |
void | set_cancelled_state () |
void | cancellation_enable (bool Value) |
void | set_cancelled_state () |
Static Private Member Functions | |
static Thread * | start_routine (Thread *ThreadSource) |
static Thread * | start_routine (Thread *ThreadSource) |
static Thread * | start_routine (Thread *ThreadSource) |
Private Attributes | |
boost::shared_ptr< impl > | p |
signal_type | m_cancel_via_signal |
Signal to use for cancelation. More... | |
bool | m_cancel_state |
Enable or disable the cancellability of a thread. More... | |
bool | m_cancel_thread |
Conditional state of thread being cancelled. More... | |
cancel_type | m_cancellation_type |
Method used for thread cancellation. More... | |
bool | detached |
State of detached. More... | |
typedef void( * LDASTools::AL::Thread::cleanup_function_type) (void *) |
typedef void( * LDASTools::AL::Thread::cleanup_function_type) (void *) |
typedef void( * LDASTools::AL::Thread::cleanup_function_type) (void *) |
|
protected |
|
protected |
|
protected |
LDASTools::AL::Thread::Thread | ( | ) |
|
virtual |
LDASTools::AL::Thread::Thread | ( | ) |
|
virtual |
LDASTools::AL::Thread::Thread | ( | ) |
|
virtual |
|
protectedpure virtual |
Job to be acomplished by the thread.
Implemented in LDASTools::AL::TaskThread, LDASTools::AL::Log, LDASTools::AL::TaskThread, LDASTools::AL::Log, LDASTools::AL::TaskThread, and LDASTools::AL::Log.
|
protectedpure virtual |
Job to be acomplished by the thread.
Implemented in LDASTools::AL::TaskThread, LDASTools::AL::Log, LDASTools::AL::TaskThread, LDASTools::AL::Log, LDASTools::AL::TaskThread, and LDASTools::AL::Log.
|
protectedpure virtual |
Job to be acomplished by the thread.
Implemented in LDASTools::AL::TaskThread, LDASTools::AL::Log, LDASTools::AL::TaskThread, LDASTools::AL::Log, LDASTools::AL::TaskThread, and LDASTools::AL::Log.
|
virtual |
|
virtual |
|
virtual |
|
staticprotected |
Perform cleanup of a cancelled thread.
[in] | Source | The thread being cancelled. |
|
staticprotected |
Perform cleanup of a cancelled thread.
[in] | Source | The thread being cancelled. |
|
staticprotected |
Perform cleanup of a cancelled thread.
[in] | Source | The thread being cancelled. |
|
private |
Establish the cancellability of a thread. If a Value of true is passed, then the thread will allow cancellation as determined by the call to CancellationType.
|
private |
|
private |
void LDASTools::AL::Thread::CancellationCheck | ( | const std::string & | Header, |
const char * | File, | ||
const int | Line | ||
) | const |
Deliver pending cancellation requests to the calling thread.
[in] | Header | Description of the method from which the request was made |
[in] | File | Filename from where the request was made. |
[in] | Line | Line number in Filename from where the request was made. |
Deliver any pending cancellation requests to the calling thread. If cancellation is to be done via exception, then a cancellation exception is throw. If not, then a call to the appropriate thread library's cancellation routine is made.
void LDASTools::AL::Thread::CancellationCheck | ( | const std::string & | Header, |
const char * | File, | ||
const int | Line | ||
) | const |
Deliver pending cancellation requests to the calling thread.
[in] | Header | Description of the method from which the request was made |
[in] | File | Filename from where the request was made. |
[in] | Line | Line number in Filename from where the request was made. |
void LDASTools::AL::Thread::CancellationCheck | ( | const std::string & | Header, |
const char * | File, | ||
const int | Line | ||
) | const |
Deliver pending cancellation requests to the calling thread.
[in] | Header | Description of the method from which the request was made |
[in] | File | Filename from where the request was made. |
[in] | Line | Line number in Filename from where the request was made. |
void LDASTools::AL::Thread::CancellationEnable | ( | bool | Value | ) |
void LDASTools::AL::Thread::CancellationEnable | ( | bool | Value | ) |
void LDASTools::AL::Thread::CancellationEnable | ( | bool | Value | ) |
void LDASTools::AL::Thread::CancellationType | ( | cancel_type | Type, |
signal_type | Signal = SignalHandler::SIGNAL_UNKNOWN |
||
) |
Establiosh the type of cancellation.
[in] | Type | The type of cancellation. |
[in] | Signal | Any auxiliary information associated with the cancellation type. |
Sets a how a thread can be cancelled.
void LDASTools::AL::Thread::CancellationType | ( | cancel_type | Type, |
signal_type | Signal = SignalHandler::SIGNAL_UNKNOWN |
||
) |
Establiosh the type of cancellation.
[in] | Type | The type of cancellation. |
[in] | Signal | Any auxiliary information associated with the cancellation type. |
void LDASTools::AL::Thread::CancellationType | ( | cancel_type | Type, |
signal_type | Signal = SignalHandler::SIGNAL_UNKNOWN |
||
) |
Establiosh the type of cancellation.
[in] | Type | The type of cancellation. |
[in] | Signal | Any auxiliary information associated with the cancellation type. |
Thread::cancel_type LDASTools::AL::Thread::CancellationType | ( | signal_type & | Signal | ) | const |
Return the type of cancellation.
[out] | Signal | Any auxiliary information associated with the cancellation type |
cancel_type LDASTools::AL::Thread::CancellationType | ( | signal_type & | Signal | ) | const |
Return the type of cancellation.
[out] | Signal | Any auxiliary information associated with the cancellation type |
cancel_type LDASTools::AL::Thread::CancellationType | ( | signal_type & | Signal | ) | const |
Return the type of cancellation.
[out] | Signal | Any auxiliary information associated with the cancellation type |
void LDASTools::AL::Thread::Detach | ( | ) | const |
void LDASTools::AL::Thread::Detach | ( | ) | const |
void LDASTools::AL::Thread::Detach | ( | ) | const |
bool LDASTools::AL::Thread::IsAlive | ( | ) | const |
bool LDASTools::AL::Thread::IsAlive | ( | ) | const |
bool LDASTools::AL::Thread::IsAlive | ( | ) | const |
bool LDASTools::AL::Thread::IsCancelled | ( | ) | const |
Return the cancellation state of the thread.
bool LDASTools::AL::Thread::IsCancelled | ( | ) | const |
Return the cancellation state of the thread.
bool LDASTools::AL::Thread::IsCancelled | ( | ) | const |
Return the cancellation state of the thread.
bool LDASTools::AL::Thread::IsDetached | ( | ) | const |
Reports detached state.
bool LDASTools::AL::Thread::IsDetached | ( | ) | const |
Reports detached state.
bool LDASTools::AL::Thread::IsDetached | ( | ) | const |
Reports detached state.
bool LDASTools::AL::Thread::IsParentThread | ( | ) | const |
bool LDASTools::AL::Thread::IsParentThread | ( | ) | const |
bool LDASTools::AL::Thread::IsParentThread | ( | ) | const |
|
virtual |
|
virtual |
|
virtual |
int LDASTools::AL::Thread::Kill | ( | signal_type | Signal | ) | const |
int LDASTools::AL::Thread::Kill | ( | signal_type | Signal | ) | const |
int LDASTools::AL::Thread::Kill | ( | signal_type | Signal | ) | const |
bool LDASTools::AL::Thread::operator== | ( | const Thread & | Source | ) | const |
bool LDASTools::AL::Thread::operator== | ( | const Thread & | Source | ) | const |
bool LDASTools::AL::Thread::operator== | ( | const Thread & | Source | ) | const |
|
inline |
Retrieve key for parent thread.
thread_type LDASTools::AL::Thread::ParentThread | ( | ) | const |
Retrieve key for parent thread.
thread_type LDASTools::AL::Thread::ParentThread | ( | ) | const |
Retrieve key for parent thread.
|
static |
|
static |
|
static |
|
private |
|
private |
|
private |
void LDASTools::AL::Thread::SignalCapture | ( | SignalHandler::signal_type | Sig | ) |
void LDASTools::AL::Thread::SignalCapture | ( | signal_type | Sig | ) |
void LDASTools::AL::Thread::SignalCapture | ( | signal_type | Sig | ) |
void LDASTools::AL::Thread::SignalIgnore | ( | SignalHandler::signal_type | Sig | ) |
void LDASTools::AL::Thread::SignalIgnore | ( | signal_type | Sig | ) |
void LDASTools::AL::Thread::SignalIgnore | ( | signal_type | Sig | ) |
|
virtual |
|
virtual |
|
virtual |
|
protected |
Spawn a new thread.
[in] | StartFunction | The routine for the new thread to start. |
|
protected |
Spawn a new thread.
[in] | StartFunction | The routine for the new thread to start. |
|
protected |
Spawn a new thread.
[in] | StartFunction | The routine for the new thread to start. |
|
inlinestatic |
|
static |
|
static |
|
static |
Establish the default value of the stack size used when creating new threads. This routine does validate the requested value..
|
static |
|
static |
|
inlineprotected |
|
protected |
|
protected |
|
mutableprivate |
State of detached.
|
mutableprivate |
Enable or disable the cancellability of a thread.
|
mutableprivate |
Conditional state of thread being cancelled.
|
private |
Signal to use for cancelation.
|
mutableprivate |
Method used for thread cancellation.
|
private |