• 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: Checks required for multiple asynchronous NSURLConnections?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Checks required for multiple asynchronous NSURLConnections?


  • Subject: Re: Checks required for multiple asynchronous NSURLConnections?
  • From: Kyle Sluder <email@hidden>
  • Date: Tue, 28 Jul 2009 00:32:08 -0700

On Jul 28, 2009, at 12:07 AM, Debajit Adhikary <email@hidden> wrote:

- Is it possible that more than two connections will use the delegate at
the same time? (I would think so)

Asynchronous does not always mean your callbacks are invoked on another thread -- or that threads are even involved at all. The system can synchronously dispatch the HTTP connection, ad itself as an input source to the current runloop, and return to your code, firing at the appropriate time.


Since the documentation states that callbacks are called on the same thread as the asynchronous call is made, two can't execute at once (as long as all your connections are made on the same thread).

- If yes, how is it resolved? (Does Cocoa do this automatically?)

Re-read the run loops documentation and then the NSURLConnection documentation again.


--Kyle Sluder
_______________________________________________

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: 
 >Checks required for multiple asynchronous NSURLConnections? (From: Debajit Adhikary <email@hidden>)

  • Prev by Date: Re: Cocoa Document-Based App v. Windows MDI App
  • Next by Date: Re: Cocoa Document-Based App v. Windows MDI App
  • Previous by thread: Re: Checks required for multiple asynchronous NSURLConnections?
  • Next by thread: Building iPhone application as backward compatible
  • Index(es):
    • Date
    • Thread