[Ace-users] [ace-users] ACE_Task and ACE_Task_Base

Jim Hodapp james.hodapp at gmail.com
Mon Feb 25 10:41:29 CST 2008

If I have a class that derives from ACE_Task<ACE_MT_SYNCH> and I call  
activate() on it from main(), then I want to cancel the task from  
running at a certain event (like a keystroke in my case). Is the  
proper way to cancel this task to use ACE_Thread_Manager::instance()- 
 >cancel_task(my_task_instance_pointer, 1); ? Does this effectively  
cause svc() in the ACE_Task to complete and return? Is it better to  
make a member function of my class that is a ACE_Task that effectively  
makes svc() return without having to cancel the task from main?



More information about the Ace-users mailing list