On Aug 27, 2013, at 7:24 AM, Bradley O'Hearne <[email protected]> wrote:
> So switching to iOS for a moment, things like location services callbacks, > NSURLConnection callbacks, animation completion handlers, accelerometer and > touch events -- all main thread? (I'm pretty sure a few of those aren't main > thread, but asking just the same -- I'm not sure that detail is actually in > the API doc for all of them. NSURLConnection's callbacks are invoked on whatever thread/runloop you started the connection on. (Unless you explicitly schedule it in a different runloop or dispatch queue.) It’s perfectly fine to run it on a background thread. The docs explain this. The same goes for other I/O stuff like NSStream or CFStream. A good clue is that if the API has a method like -scheduleInRunloop: or -setDelegateQueue:, it supports background threads. The API docs are generally good about explaining the threading of callbacks. If they don’t say anything, assume main thread. —Jens _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
