• 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
NSURLConnection: synchronous or asynchronous connections?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSURLConnection: synchronous or asynchronous connections?


  • Subject: NSURLConnection: synchronous or asynchronous connections?
  • From: Toby Atkin-Wright <email@hidden>
  • Date: Thu, 27 Jan 2005 11:37:15 +0000

Hi.

I'm writing an iPhoto plugin that uploads images to a web site, making a series of HTTP requests one after another. As I see it, I could either:

1/ Issue asynchronous requests, and keep track through delegate methods to update the progress bar, report errors, and trigger subsequent requests.

-or-

2/ Start a worker thread that issues synchronous requests one after another, while the main thread waits to hear from the worker and updates the progress bar etc. accordingly.


I can't decide which approach would be best - I can see pros and cons of each, but I don't know if one is 'obviously' the best way to work in Cocoa. (My code is currently working with asynchronous requests, but as I add more features, I keep thinking it may be easier with a separate thread.)


I'd welcome any advice!


Toby

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSURLConnection: synchronous or asynchronous connections?
      • From: Nicko van Someren <email@hidden>
  • Prev by Date: Re: Database
  • Next by Date: [newbie] Question about NSText
  • Previous by thread: Re: passing messages to parent controls?
  • Next by thread: Re: NSURLConnection: synchronous or asynchronous connections?
  • Index(es):
    • Date
    • Thread