On 11 Nov 2010, at 07:13, Shane wrote: > I've got an NSOperation thread running, but I'd like to be able to > send a message to it so that the thread can be shut it down, or > possibly other commands. > > What is considered a good way to send a message to an NSOperation > thread from the apps main thread? > _______________________________________________ >
NSOperation is a great way to schedule a distinct and largely none interacting operation. It is not a universal concurrency solution. I would drop down to NSThread in this situation. You have to do a bit more management but you get the control you need. Also NSOperation generated threads do not, IIRC, instantiate a run loop. If you want to message your thread using performSelector:onThread you will need a run loop. Regards Jonathan Mitchell Developer Mugginsoft LLP http://www.mugginsoft.com _______________________________________________ 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 arch...@mail-archive.com