ccrtp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ccrtp-devel] join function for Thread (OST)


From: David Sugar
Subject: Re: [Ccrtp-devel] join function for Thread (OST)
Date: Mon, 28 Feb 2005 17:45:00 -0500
User-agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)

join simply waits (blocks) until a thread exits or is canceled. Normally you do not have to call join in your application at all; if you delete a Thread derived object, if it's derived ~destructor invokes terminate(), then during the delete, the target thread will be both canceled and joined for you automatically. Usually it is best to put terminate() first in the derived destructor, and any other cleanup code after that. The cleanup code will then execute in the context of the thread that is initiating the delete, and will happen after the target thread has stopped executing so there is no risk of a resource still in use by the target thread.

Dan Weber wrote:


On Tue, 18 Jan 2005, Laurielle LEA wrote:

Hi everybody,

I use Thread class of OST namespace.
When I use join(), my application is blocking
sometimes, so I remove this function and it seems to
work better.
I would like to know if it's good or not to have
removed it on my code.


The entire point of join is to block util the thread dies. Thats standard practice with all threads.

Dan


_______________________________________________
Ccrtp-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/ccrtp-devel

Attachment: dyfet.vcf
Description: Vcard


reply via email to

[Prev in Thread] Current Thread [Next in Thread]