• 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: Jean-Daniel Dupas <email@hidden>
  • Date: Tue, 28 Jul 2009 09:25:29 +0200


Le 28 juil. 09 à 09:07, Debajit Adhikary a écrit :

I have multiple asynchronous HTTP requests being made at the same time. All
these use the same NSURLConnection delegate functions. (The receivedData
object is different for each connection though—this is done using a
dictionary with the key as the connection itself. In the delegate, I parse
the receivedDate object, and do additional operations on those parsed
strings)


Everything seems to work fine for me so far, but I'm not sure if I need to
do anything specific to ensure correct “multithreaded” behavior.


- Is it possible that more than two connections will use the delegate at
the same time? (I would think so)
- If yes, how is it resolved? (Does Cocoa do this automatically?)
- Do I need to have additional checks in place to ensure that each
request is handled “correctly”?

Asynchronous does not mean multithreaded.

Now a simple exercice.
Open the NSURLConnection reference. search for thread.

First answer:

Note that these delegate methods will be called on the thread that started the asynchronous load operation for the associated NSURLConnection object.


_______________________________________________

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: where can I download xcode 3.2
  • Next by Date: Re: Cocoa Document-Based App v. Windows MDI App
  • Previous by thread: Checks required for multiple asynchronous NSURLConnections?
  • Next by thread: Re: Checks required for multiple asynchronous NSURLConnections?
  • Index(es):
    • Date
    • Thread