#include <TaskThread.hh>
|
enum | state_type {
TASK_THREAD_NOT_STARTED
, TASK_THREAD_SLEEPING
, TASK_THREAD_RUNNING
, TASK_THREAD_TIMEDOUT
,
TASK_THREAD_FINISHED
, TASK_THREAD_EXITING
} |
|
typedef Thread::cancel_type | cancel_method |
|
typedef Thread::signal_type | task_signal_type |
|
enum | cancel_type {
CANCEL_ABANDON
, CANCEL_IGNORE
, CANCEL_ASYNCHRONOUS
, CANCEL_DEFERRED
,
CANCEL_EXCEPTION
, CANCEL_BY_SIGNAL
, CANCEL_UNKNOWN
} |
|
typedef SignalHandler::signal_type | signal_type |
|
typedef void(* | cleanup_function_type) (void *) |
|
◆ cancel_method
◆ cleanup_function_type
typedef void(* LDASTools::AL::Thread::cleanup_function_type) (void *) |
|
inherited |
◆ signal_type
◆ start_function_type
typedef void *(* LDASTools::AL::Thread::start_function_type) (void *) |
|
protectedinherited |
◆ task_signal_type
◆ cancel_type
Enumerator |
---|
CANCEL_ABANDON | |
CANCEL_IGNORE | |
CANCEL_ASYNCHRONOUS | |
CANCEL_DEFERRED | |
CANCEL_EXCEPTION | |
CANCEL_BY_SIGNAL | |
CANCEL_UNKNOWN | |
◆ state_type
Enumerator |
---|
TASK_THREAD_NOT_STARTED | |
TASK_THREAD_SLEEPING | |
TASK_THREAD_RUNNING | |
TASK_THREAD_TIMEDOUT | |
TASK_THREAD_FINISHED | |
TASK_THREAD_EXITING | |
◆ TaskThread() [1/2]
LDASTools::AL::TaskThread::TaskThread |
( |
| ) |
|
◆ ~TaskThread()
LDASTools::AL::TaskThread::~TaskThread |
( |
| ) |
|
|
virtual |
◆ TaskThread() [2/2]
LDASTools::AL::TaskThread::TaskThread |
( |
const TaskThread & |
Source | ) |
|
|
private |
◆ action()
void LDASTools::AL::TaskThread::action |
( |
| ) |
|
|
privatevirtual |
This method does the work of the thread and runs in the conrtolled thread. It does a task and then waits for another task. This allows for the thread to be reused.
Implements LDASTools::AL::Thread.
◆ AddTask() [1/2]
void LDASTools::AL::TaskThread::AddTask |
( |
Task & |
TaskToDo | ) |
|
|
inline |
◆ AddTask() [2/2]
void LDASTools::AL::TaskThread::AddTask |
( |
Task * |
TaskToDo | ) |
|
◆ Cancel()
void LDASTools::AL::Thread::Cancel |
( |
| ) |
|
|
virtualinherited |
◆ cancelCleanup()
void LDASTools::AL::Thread::cancelCleanup |
( |
Thread * |
Source | ) |
|
|
staticprotectedinherited |
Perform cleanup of a cancelled thread.
- Parameters
-
[in] | Source | The thread being cancelled. |
◆ cancellation_enable()
void LDASTools::AL::Thread::cancellation_enable |
( |
bool |
Value | ) |
|
|
privateinherited |
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.
- Note
- This call must only be made by a child thread.
- See also
- CancellationType
◆ CancellationCheck()
void LDASTools::AL::Thread::CancellationCheck |
( |
const std::string & |
Header, |
|
|
const char * |
File, |
|
|
const int |
Line |
|
) |
| const |
|
inherited |
Deliver pending cancellation requests to the calling thread.
- Parameters
-
[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.
- Note
- This call must only be made by a child thread.
◆ CancellationEnable()
void LDASTools::AL::Thread::CancellationEnable |
( |
bool |
Value | ) |
|
|
inherited |
◆ CancellationType() [1/2]
Establiosh the type of cancellation.
- Parameters
-
[in] | Type | The type of cancellation. |
[in] | Signal | Any auxiliary information associated with the cancellation type. |
Sets a how a thread can be cancelled.
-
CANCEL_ASYNCHRONOUS A cancellation request is immediated delivered to the thread.
-
CANCEL_DEFERRED A cancellation request is marked pending for the thread and the thread is cancelled when it gets to a system cancellation point or when CancellationCheck is called.
-
CANCEL_EXCEPTION A cancellation request is marked pending for the thread and the thread throws a cancellation exception upon calling CancellationCheck.
- Note
- This call must only be made by a chivld thread.
- See also
- CancellationEnable, CancellationCheck
◆ CancellationType() [2/2]
Return the type of cancellation.
- Parameters
-
[out] | Signal | Any auxiliary information associated with the cancellation type |
- Returns
- The type of cancellation.
- See also
- cancel_type
◆ CriticalSection()
void LDASTools::AL::TaskThread::CriticalSection |
( |
bool |
IsCriticalSection | ) |
|
◆ Detach()
void LDASTools::AL::Thread::Detach |
( |
| ) |
const |
|
inherited |
◆ Halt()
bool LDASTools::AL::TaskThread::Halt |
( |
| ) |
|
◆ IsAlive()
bool LDASTools::AL::Thread::IsAlive |
( |
| ) |
const |
|
inherited |
◆ IsCancelled()
bool LDASTools::AL::Thread::IsCancelled |
( |
| ) |
const |
|
inherited |
Return the cancellation state of the thread.
- Returns
- Returns true if the thread has been cancelled, false otherwise.
◆ IsDetached()
bool LDASTools::AL::Thread::IsDetached |
( |
| ) |
const |
|
inherited |
Reports detached state.
- Returns
- Returns true if the thread has been detached, false otherwise
◆ IsParentThread()
bool LDASTools::AL::Thread::IsParentThread |
( |
| ) |
const |
|
inherited |
◆ Join()
void LDASTools::AL::Thread::Join |
( |
| ) |
|
|
virtualinherited |
◆ Kill()
◆ Mutex()
◆ Name()
◆ operator=()
◆ operator==()
bool LDASTools::AL::Thread::operator== |
( |
const Thread & |
Source | ) |
const |
|
inherited |
◆ ParentThread()
Thread::thread_type LDASTools::AL::Thread::ParentThread |
( |
| ) |
const |
|
inlineinherited |
Retrieve key for parent thread.
◆ SelfCancellationCheck()
static void LDASTools::AL::Thread::SelfCancellationCheck |
( |
const std::string & |
Header, |
|
|
const char * |
File, |
|
|
const int |
Line |
|
) |
| |
|
staticinherited |
◆ set_cancelled_state()
void LDASTools::AL::Thread::set_cancelled_state |
( |
| ) |
|
|
privateinherited |
◆ SignalCapture()
◆ SignalIgnore()
◆ Spawn()
int LDASTools::AL::Thread::Spawn |
( |
| ) |
|
|
virtualinherited |
◆ spawn()
Spawn a new thread.
- Parameters
-
[in] | StartFunction | The routine for the new thread to start. |
◆ StackSizeDefault() [1/2]
size_t LDASTools::AL::Thread::StackSizeDefault |
( |
| ) |
|
|
inlinestaticinherited |
◆ StackSizeDefault() [2/2]
void LDASTools::AL::Thread::StackSizeDefault |
( |
size_t |
StackSize | ) |
|
|
staticinherited |
Establish the default value of the stack size used when creating new threads. This routine does validate the requested value..
◆ start_routine()
Thread * LDASTools::AL::Thread::start_routine |
( |
Thread * |
ThreadSource | ) |
|
|
staticprivateinherited |
◆ State()
◆ StateStr()
std::string LDASTools::AL::TaskThread::StateStr |
( |
enum state_type |
Value | ) |
|
|
static |
◆ threadId()
Thread::thread_type LDASTools::AL::Thread::threadId |
( |
| ) |
const |
|
inlineprotectedinherited |
◆ TimedOut()
bool LDASTools::AL::TaskThread::TimedOut |
( |
| ) |
|
|
inline |
◆ TimedWait()
void LDASTools::AL::TaskThread::TimedWait |
( |
int |
Seconds | ) |
|
◆ Type()
const char * LDASTools::AL::TaskThread::Type |
( |
| ) |
const |
|
inline |
◆ Wait()
void LDASTools::AL::TaskThread::Wait |
( |
| ) |
|
◆ detached
bool LDASTools::AL::Thread::detached |
|
mutableprivateinherited |
◆ m_cancel_method
◆ m_cancel_signal
◆ m_cancel_state
bool LDASTools::AL::Thread::m_cancel_state |
|
mutableprivateinherited |
Enable or disable the cancellability of a thread.
◆ m_cancel_thread
bool LDASTools::AL::Thread::m_cancel_thread |
|
mutableprivateinherited |
Conditional state of thread being cancelled.
◆ m_cancel_via_signal
Signal to use for cancelation.
◆ m_cancellation_type
Method used for thread cancellation.
◆ m_done
bool LDASTools::AL::TaskThread::m_done |
|
private |
◆ m_state
◆ m_task
Task* LDASTools::AL::TaskThread::m_task |
|
private |
◆ m_task_available
◆ m_task_type_name
const char* LDASTools::AL::TaskThread::m_task_type_name |
|
private |
boost::shared_ptr< impl > LDASTools::AL::Thread::p |
|
privateinherited |
◆ task_name
The documentation for this class was generated from the following files:
- /home/abuild/rpmbuild/BUILD/ldas-tools-al-2.6.4/src/TaskThread.hh
- /home/abuild/rpmbuild/BUILD/ldas-tools-al-2.6.4/src/TaskThread.cc