On Nov 25, 2008, at 1:17 AM, Mahaboob wrote:

On 11/25/08 2:33 PM, "Mahaboob" <[EMAIL PROTECTED]> wrote:




On 11/24/08 10:01 PM, "Joseph Kelly" <[EMAIL PROTECTED]> wrote:

Why can't your thread just return when it's finished?

I'm new to thread programming. I need to kill the thread in a void function.
Here I'm attaching the file. Is it I'm going right way?

I looked at your code, and you really have no need to explicitly kill the thread. When you set your m_isBackgroundThreadToTerminate to YES and tell the run loop to stop, it should just exit. If it's crashing, I think it's probably due to some other kind of issues (in which case you will find this link to be quite valuable: http://developer.apple.com/technotes/tn2004/tn2124.html) .

If you are developing for 10.5 only, I would strongly recommend using NSOperation, which effectively hides some of the details of threading and concurrency.

 Joe K.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to