[ace-users] How to terminate the task-thread when delete
theACE_Task object?
Steve Huston
shuston at riverace.com
Fri Jul 27 14:17:28 CDT 2007
Hi Cui,
Thanks for the PROBLEM-REPORT-FORM!
It's inadviseable to cancel a thread - it may leave things in an
unrecoverable state. It's much better to design/use one of the other
ways to tell a thread to exit - which one depends on what your code is
doing. Please review chapter 6 in C++NPv2 for some suggestions
(C++NPv2 info is at http://www.riverace.com/acebooks/index.htm#cnpv2)
Best regards,
-Steve
--
Steve Huston, Riverace Corporation
Would you like ACE to run great on your platform?
See http://www.riverace.com/sponsor.htm
> -----Original Message-----
> From: ace-users-bounces at cse.wustl.edu=20
> [mailto:ace-users-bounces at cse.wustl.edu] On Behalf Of cui shaowei
> Sent: Friday, July 27, 2007 3:05 PM
> To: ace-users at cs.wustl.edu
> Subject: [ace-users] How to terminate the task-thread when=20
> delete theACE_Task object?
>=20
>=20
> HI :
> PRF:
> ACE VERSION: 5.5.9
>=20
> HOST MACHINE and OPERATING SYSTEM:
> Red Hat Enterprise Linux AS release 4 (Nahant Update 3) run
> on wmware workstation 6.0
>=20
> COMPILER NAME AND VERSION (AND PATCHLEVEL):
> gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)
>=20
> Question:
> I want to know ,
> how to terminate the task-thread when delete the ACE_Task
object?
> does cancel_task OK?
> int ACE_Thread_Manager::cancel_task (ACE_Task_Base *task, int
> async_cancel =3D 0);"
> Best regards,
> cui
> --=20
> | (\_/) This is Bunny. Copy and paste Bunny
> | (=3D'.'=3D) into your signature to help him gain
> | (")_(") world domination.
>=20
> =B4=DE=C9=D9=CE=B0
> Tel: 13810421852
> QQ: 43458943
> MSN: shaovie at hotmail.com
>=20
More information about the Ace-users
mailing list