diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-09-24 21:51:10 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-09-24 21:51:10 +0000 |
commit | d13d91b0e6e9fc23ddbb58400c9667ee70416c08 (patch) | |
tree | d571faa2685ea5bdbd84ad5187e2710829f13c5d /examples | |
parent | 871a6a7f7d04b99f8df7ae002f25999aca65239f (diff) | |
download | ATCD-d13d91b0e6e9fc23ddbb58400c9667ee70416c08.tar.gz |
.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Timer_Queue/Thread_Timer_Queue_Test.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp b/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp index 62bb67921bb..4d3f2740218 100644 --- a/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp +++ b/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp @@ -134,7 +134,7 @@ Input_Task::add_timer (void *argument) int Input_Task::cancel_timer (void *argument) { - return this->queue_->cancel (*(int *) argument); + return this->queue_->cancel (*(int *) argument); } // Lists the timers in the queue. Ignores the argument. This method @@ -162,12 +162,15 @@ Input_Task::shutdown_timer (void *argument) // Macro to avoid "warning: unused parameter" type warning. ACE_UNUSED_ARG (argument); -#if !defined (ACE_LACKS_PTHREAD_CANCEL) - // Cancel the thread timer queue task "preemptively." - ACE_Thread::cancel (this->queue_->thr_id ()); -#else +#if defined (ACE_LACKS_PTHREAD_CANCEL) // Cancel the thread timer queue task "voluntarily." this->queue_->deactivate (); +#else + // Cancel the thread timer queue task "preemptively." + if (ACE_Thread::cancel (this->queue_->thr_id ()) == -1) + ACE_ERROR ((LM_ERROR, + "%p\n", + "cancel")); #endif /* ACE_LACKS_PTHREAD_CANCEL */ // -1 indicates we are shutting down the application. |