• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Running NSURLConnection from within an NSOperation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running NSURLConnection from within an NSOperation?


  • Subject: Re: Running NSURLConnection from within an NSOperation?
  • From: Laurent Daudelin <email@hidden>
  • Date: Tue, 9 Feb 2010 15:29:15 -0800

On Feb 9, 2010, at 15:01, Keith Duncan wrote:

>
> On 9 Feb 2010, at 22:18, Laurent Daudelin wrote:
>
>>> Try using the synchronous version of NSURLConnection […]
>
> No, don't do this. This method simply creates a private NSURLConnection delegate and enters the run loop until completion or failure.
>
> This ties the NSOperation worker thread up until completion which may shift thread ramp up costs onto other parts of you application.
>
> Instead you should create a 'concurrent' NSOperation as described in the documentation, and schedule your NSURLConnection on +[NSRunLoop mainRunLoop]. This will allow your NSOperation -start method to exit immediately and the thread to return to the pool.
>
> Keith

Thanks, Keith. I'll look into it.

-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin 				http://nemesys.dyndns.org
Logiciels Nemesys Software              				email@hidden
Photo Gallery Store: http://laurentdaudelin.shutterbugstorefront.com/g/galleries

_______________________________________________

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

References: 
 >Running NSURLConnection from within an NSOperation? (From: Laurent Daudelin <email@hidden>)
 >Re: Running NSURLConnection from within an NSOperation? (From: Greg Reichow <email@hidden>)
 >Re: Running NSURLConnection from within an NSOperation? (From: Laurent Daudelin <email@hidden>)
 >Re: Running NSURLConnection from within an NSOperation? (From: Keith Duncan <email@hidden>)

  • Prev by Date: Re: Cocoa method to determine if application is running on iPhone
  • Next by Date: Re: Cocoa method to determine if application is running on iPhone
  • Previous by thread: Re: Running NSURLConnection from within an NSOperation?
  • Next by thread: Re: Running NSURLConnection from within an NSOperation?
  • Index(es):
    • Date
    • Thread