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 CSObject * | getNextLink () |
| virtual CSObject * | getPrevLink () |
| virtual void | setNextLink (CSObject *link) |
| virtual void | setPrevLink (CSObject *link) |
| virtual void | retain () |
| virtual void | release () |
| uint32_t | getRefCount () |
| virtual void | finalize () |
| virtual CSObject * | getKey () |
| virtual int | compareKey (CSObject *) |
| virtual uint32_t | hashKey () |
| virtual CSObject * | getHashLink () |
| 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 CSThread * | getSelf () |
| static bool | setSelf (CSThread *self) |
| static CSThread * | newCSThread () |
| static CSThread * | newThread (CSString *name, ThreadRunFunc run_func, CSThreadList *list) |
| static void * | dispatch (void *arg) |
Public Attributes | |
| CSString * | threadName |
| CSThreadList * | myThreadList |
| 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 |
| CSObject * | iNextLink |
| CSObject * | iPrevLink |
Friends | |
| class | CSDaemon |
Definition at line 105 of file CSThread.h.
| 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.
| CSSystemException | thrown if thread is invalid. |
Definition at line 323 of file CSThread.cc.
| void * CSThread::run | ( | ) | [virtual] |
Task to be performed by this thread.
| CSSystemException | thrown 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.
| timeout | maximum amount of time (milliseconds) this method could block |
| TDInterruptedException | thrown 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.
| CSSystemException | thrown if thread is invalid. |
Definition at line 296 of file CSThread.cc.