|
ldas-tools-al 2.6.7
|
#include <Thread.hh>

Classes | |
| class | cancellation |
| class | deadlock |
| class | invalid_argument |
| class | range_error |
| class | Self |
| Operates on current thread. More... | |
Public Types | |
| enum | cancel_type { CANCEL_ABANDON , CANCEL_IGNORE , CANCEL_ASYNCHRONOUS , CANCEL_DEFERRED , CANCEL_EXCEPTION , CANCEL_BY_SIGNAL , CANCEL_UNKNOWN , CANCEL_ABANDON , CANCEL_IGNORE , CANCEL_ASYNCHRONOUS , CANCEL_DEFERRED , CANCEL_EXCEPTION , CANCEL_BY_SIGNAL , CANCEL_UNKNOWN } |
| enum | cancel_type { CANCEL_ABANDON , CANCEL_IGNORE , CANCEL_ASYNCHRONOUS , CANCEL_DEFERRED , CANCEL_EXCEPTION , CANCEL_BY_SIGNAL , CANCEL_UNKNOWN , CANCEL_ABANDON , CANCEL_IGNORE , CANCEL_ASYNCHRONOUS , CANCEL_DEFERRED , CANCEL_EXCEPTION , CANCEL_BY_SIGNAL , CANCEL_UNKNOWN } |
| typedef SignalHandler::signal_type | signal_type |
| typedef SignalHandler::signal_type | signal_type |
| typedef void(* | cleanup_function_type) (void *) |
| typedef void(* | cleanup_function_type) (void *) |
Public Member Functions | |
| Thread () | |
| Thread () | |
| virtual | ~Thread () |
| virtual | ~Thread () |
| virtual void | Cancel () |
| virtual void | Cancel () |
| void | CancellationCheck (const std::string &Header, const char *File, const int Line) const |
| Deliver pending cancellation requests to the calling thread. | |
| void | CancellationCheck (const std::string &Header, const char *File, const int Line) const |
| Deliver pending cancellation requests to the calling thread. | |
| void | CancellationEnable (bool Value) |
| void | CancellationEnable (bool Value) |
| cancel_type | CancellationType (signal_type &Signal) const |
| Return the type of cancellation. | |
| void | CancellationType (cancel_type Type, signal_type Signal=SignalHandler::SIGNAL_UNKNOWN) |
| Establiosh the type of cancellation. | |
| cancel_type | CancellationType (signal_type &Signal) const |
| Return the type of cancellation. | |
| void | CancellationType (cancel_type Type, signal_type Signal=SignalHandler::SIGNAL_UNKNOWN) |
| Establiosh the type of cancellation. | |
| void | Detach () const |
| void | Detach () const |
| virtual void | Join () |
| virtual void | Join () |
| bool | IsAlive () const |
| bool | IsAlive () const |
| bool | IsCancelled () const |
| Return the cancellation state of the thread. | |
| bool | IsCancelled () const |
| Return the cancellation state of the thread. | |
| bool | IsDetached () const |
| Reports detached state. | |
| bool | IsDetached () const |
| Reports detached state. | |
| bool | IsParentThread () const |
| bool | IsParentThread () const |
| int | Kill (signal_type Signal) const |
| int | Kill (signal_type Signal) const |
| thread_type | ParentThread () const |
| Retrieve key for parent thread. | |
| thread_type | ParentThread () const |
| Retrieve key for parent thread. | |
| virtual int | Spawn () |
| virtual int | Spawn () |
| void | SignalCapture (signal_type Sig) |
| void | SignalCapture (signal_type Sig) |
| void | SignalIgnore (signal_type Sig) |
| void | SignalIgnore (signal_type Sig) |
| bool | operator== (const Thread &Source) const |
| bool | operator== (const Thread &Source) const |
Static Public Member Functions | |
| static void | SelfCancellationCheck (const std::string &Header, const char *File, const int Line) |
| static void | SelfCancellationCheck (const std::string &Header, const char *File, const int Line) |
| static size_t | StackSizeDefault () |
| static void | StackSizeDefault (size_t StackSize) |
| static size_t | StackSizeDefault () |
| static void | StackSizeDefault (size_t StackSize) |
Protected Types | |
| 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. | |
| virtual void | action ()=0 |
| Job to be acomplished by the thread. | |
| int | spawn (start_function_type StartFunction=(start_function_type) start_routine) |
| Spawn a new thread. | |
| int | spawn (start_function_type StartFunction=(start_function_type) start_routine) |
| Spawn a new thread. | |
| thread_type | threadId () const |
| thread_type | threadId () const |
Static Protected Member Functions | |
| static void | cancelCleanup (Thread *Source) |
| Perform cleanup of a cancelled thread. | |
| static void | cancelCleanup (Thread *Source) |
| Perform cleanup of a cancelled thread. | |
Private Member Functions | |
| void | cancellation_enable (bool Value) |
| void | cancellation_enable (bool Value) |
| void | set_cancelled_state () |
| void | set_cancelled_state () |
Static Private Member Functions | |
| 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. | |
| bool | m_cancel_state |
| Enable or disable the cancellability of a thread. | |
| bool | m_cancel_thread |
| Conditional state of thread being cancelled. | |
| cancel_type | m_cancellation_type |
| Method used for thread cancellation. | |
| bool | detached |
| State of detached. | |
| typedef void(* LDASTools::AL::Thread::cleanup_function_type) (void *) |
| typedef void(* LDASTools::AL::Thread::cleanup_function_type) (void *) |
|
protected |
|
protected |
|
virtual |
|
virtual |
|
protectedpure virtual |
Job to be acomplished by the thread.
|
protectedpure virtual |
Job to be acomplished by the thread.
|
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. |
|
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 |
| 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::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. |
| 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 |
| 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::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::IsParentThread | ( | ) | const |
| bool LDASTools::AL::Thread::IsParentThread | ( | ) | const |
|
virtual |
|
virtual |
| 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 |
|
inline |
Retrieve key for parent thread.
| thread_type LDASTools::AL::Thread::ParentThread | ( | ) | const |
Retrieve key for parent thread.
|
static |
|
static |
|
private |
|
private |
| void LDASTools::AL::Thread::SignalCapture | ( | signal_type | Sig | ) |
| void LDASTools::AL::Thread::SignalIgnore | ( | signal_type | Sig | ) |
|
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. |
|
inlinestatic |
|
static |
|
static |
Establish the default value of the stack size used when creating new threads. This routine does validate the requested value..
|
static |
|
staticprivate |
|
staticprivate |
|
inlineprotected |
|
protected |
|
mutableprivate |
State of detached.
|
mutableprivate |
Enable or disable the cancellability of a thread.
|
mutableprivate |
Conditional state of thread being cancelled.
Signal to use for cancelation.
|
mutableprivate |
Method used for thread cancellation.
|
private |