Re: Thread deadlock?
Re: Thread deadlock?
- Subject: Re: Thread deadlock?
- From: Scott Ribe <email@hidden>
- Date: Mon, 11 Aug 2008 15:44:01 -0600
- Thread-topic: Thread deadlock?
> There is a chance that my calls to performSelectorOnMainThread can have
> waitUntilDone:NO
>
> I use [myNSData writeToFile:path atomically:YES]
>
> NSFileHandle and NSFileManager are shown as not thread safe, but NSData
> is... Perhaps it is ok, but I would think NSData uses one or both of the
> above.
>
> One of the calls to performSelectorOnMainThread may need to wait on a file
> download, but I think that could be a different lock.
I think you're missing the point: once the thread has detected that it
should quit, it calls as its last statement performSelectorOnMainThread for
whatever needs to be done on the main thread, and then just falls off the
end. When the the selector is called in the main thread, you know at that
point that the thread is done--there's no need to wait for the thread to
terminate.
What do you need done that is not done by the sample code that I posted?
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice
_______________________________________________
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