Drizzled Public API Documentation

CSThread Class Reference

Inheritance diagram for CSThread:
CSRefObject CSObject CSDaemon MSBackup MSCompactorThread MSConnectionHandler MSSystemThread MSTempLogThread MSTransactionThread

List of all members.

Public Member Functions

 CSThread (CSThreadList *list)
virtual void * run ()
void start (bool detached=false)
virtual void stop ()
void * join ()
void signal (unsigned int)
void setSignalPending (unsigned int)
void interrupted ()
void throwSignal ()
void logStack (int depth, const char *msg)
void logException ()
void logMessage ()
bool isMain ()
void releaseObjects (CSReleasePtr top)
void throwException ()
void caught ()
bool isMe (CSThread *me)
virtual CSObjectgetNextLink ()
virtual CSObjectgetPrevLink ()
virtual void setNextLink (CSObject *link)
virtual void setPrevLink (CSObject *link)
virtual void retain ()
virtual void release ()
uint32_t getRefCount ()
virtual void finalize ()
virtual CSObjectgetKey ()
virtual int compareKey (CSObject *)
virtual uint32_t hashKey ()
virtual CSObjectgetHashLink ()
virtual void setHashLink (CSObject *)

Static Public Member Functions

static void sleep (unsigned long timeout)
static bool startUp ()
static void shutDown ()
static bool attach (CSThread *thread)
static void detach (CSThread *thread)
static CSThreadgetSelf ()
static bool setSelf (CSThread *self)
static CSThreadnewCSThread ()
static CSThreadnewThread (CSString *name, ThreadRunFunc run_func, CSThreadList *list)
static void * dispatch (void *arg)

Public Attributes

CSStringthreadName
CSThreadListmyThreadList
int signalPending
bool ignoreSignals
bool isRunning
bool myMustQuit
CSException myException
int callTop
CSCallStack callStack [CS_CALL_STACK_SIZE]
int jumpDepth
CSJumpBufRec jumpEnv [CS_JUMP_STACK_SIZE]
CSReleasePtr relTop
CSReleaseRec relStack [CS_RELEASE_STACK_SIZE]

Static Public Attributes

static pthread_key_t sThreadKey
static bool isUp = false

Private Member Functions

void addToList ()
void removeFromList ()

Private Attributes

pthread_t iThread
bool iIsMain
bool isDetached
ThreadRunFunc iRunFunc
CSObjectiNextLink
CSObjectiPrevLink

Friends

class CSDaemon

Detailed Description

Definition at line 105 of file CSThread.h.


Member Function Documentation

CSThread * CSThread::getSelf ( ) [static]

Return the thread object of the current thread.

Definition at line 530 of file CSThread.cc.

void CSThread::interrupted ( ) [inline]

Check to see if we have been interrupted by a signal (i.e. there is a signal pending). This function throws CSSignalException if there is a signal pending.

Definition at line 237 of file CSThread.h.

void * CSThread::join ( )

Wait for this thread to die.

Exceptions:
CSSystemExceptionthrown if thread is invalid.

Definition at line 323 of file CSThread.cc.

void * CSThread::run ( ) [virtual]

Task to be performed by this thread.

Exceptions:
CSSystemExceptionthrown if thread cannot be run.

Reimplemented in CSDaemon.

Definition at line 289 of file CSThread.cc.

void CSThread::signal ( unsigned int  sig)

Signal the thread. Throws CSSystemException if the thread is invalid.

Definition at line 349 of file CSThread.cc.

Referenced by CSThreadList::signalAllThreads().

void CSThread::sleep ( unsigned long  timeout) [static]

Put the currently executing thread to sleep for a given amount of time.

Parameters:
timeoutmaximum amount of time (milliseconds) this method could block
Exceptions:
TDInterruptedExceptionthrown if the threads sleep is interrupted before timeout milliseconds expire.

Definition at line 571 of file CSThread.cc.

void CSThread::start ( bool  detached = false)

Start execution of the thread.

Exceptions:
CSSystemExceptionthrown if thread is invalid.

Definition at line 296 of file CSThread.cc.


The documentation for this class was generated from the following files: