On Jul 16, 2010, at 3:46 PM, Rafael Cerioli <rafael.ceri...@gmail.com> wrote:
> Hi everybody, > > What would be the most efficient way to download data without blocking the UI > (I'm targeting old iPhone/iPod devices) ? > > - using a NSURLConnection seams nice, but as it calls its delegate > (-connection:didReceiveData:) on the main thread, it has to take a lock on > the main thread some times, hasn't it? No. Read up on NSRunLoop. > > - then how about using NSURLConnection in background threads, like with > +[NSThread detachNewThreadSelector:toTarget:withObject:] ? Don't do this. NSURLConnection's synchronous API is buggy, as a web search will tell you. --Kyle Sluder > _______________________________________________ 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