Re: Killing a Thread
Re: Killing a Thread
- Subject: Re: Killing a Thread
- From: Joseph Kelly <email@hidden>
- Date: Tue, 25 Nov 2008 09:20:20 -0800
On Nov 25, 2008, at 1:17 AM, Mahaboob wrote:
On 11/25/08 2:33 PM, "Mahaboob" <email@hidden> wrote:
On 11/24/08 10:01 PM, "Joseph Kelly" <email@hidden> 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 (email@hidden)
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:
This email sent to email@hidden