Re: NSThread call back...
Re: NSThread call back...
- Subject: Re: NSThread call back...
- From: Dustin Voss <email@hidden>
- Date: Wed, 9 Nov 2005 22:02:37 -0800
The message you send to the creator, you have to decide what thread
context it should be executed in.
If it does UI, directly or indirectly, it should be executed in the
main thread's context. If it just adjusts data values, it can be
executed in any thread context, but you'll have to provide some sort
of locking mechanism if you don't use the main thread context.
As to the mechanics of sending the message, the easiest ways are to
use -performSelectorOnMainThread if executing on the main thread, a
normal call if executing on the same thread, or the
InterThreadMessaging library if executing on a thread other than the
main thread (http://www.cocoadev.com/?InterThreadMessaging).
On 9 Nov 2005, at 9:25 AM, Brian O'Brien wrote:
When an NSThread wishes to communicate with the object that created
it,
how can one arrange that the thread calls a method of the creator
class?
Is this one possible use of the withObject parameter of the
NSThread detechNewThreadSelector method?
If so what is the syntax for passing the method as a parameter?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden