Re: How to set up a thread listening to performSelector: messages?
Re: How to set up a thread listening to performSelector: messages?
- Subject: Re: How to set up a thread listening to performSelector: messages?
- From: Dave Dribin <email@hidden>
- Date: Thu, 25 Sep 2008 11:09:35 -0500
On Sep 25, 2008, at 10:53 AM, Oleg Krupnov wrote:
Then from the main thread I send:
[[worker runLoop] performSelector:@selector(processRequest:)
target:worker argument:request order:0 modes:[NSArray
arrayWithObject:NSDefaultRunLoopMode]];
You cannot do this. NSRunLoop is not thread safe and the docs say
explicitly not to call methods on a different thread.
You need to use NSObject's performSelector:onThread:... method.
-Dave
_______________________________________________
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