version 1.48, 2003/10/14 21:00:02
|
version 1.49, 2003/10/16 03:11:44
|
|
|
throw NullPointer(); | throw NullPointer(); |
} | } |
| |
|
// Signal to get the thread out of the work loop. |
|
sleep_sem->signal(); |
|
// Signal to get the thread past the end. See the comment |
|
// "wait to be awakend by the thread pool destructor" |
|
// Note: the current implementation of Thread for Windows |
|
// does not implement "pthread" cancelation points so this |
|
// is needed. |
sleep_sem->signal(); | sleep_sem->signal(); |
|
|
th->dereference_tsd(); | th->dereference_tsd(); |
// signal the thread's sleep semaphore | // signal the thread's sleep semaphore |
th->cancel(); | th->cancel(); |
|
|
return((PEGASUS_THREAD_RETURN)0); | return((PEGASUS_THREAD_RETURN)0); |
} | } |
} | } |
|
|
|
// TODO: Why is this needed? Why not just continue? |
// wait to be awakend by the thread pool destructor | // wait to be awakend by the thread pool destructor |
sleep_sem->wait(); | sleep_sem->wait(); |
|
|
myself->test_cancel(); | myself->test_cancel(); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |