• 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: NSURLConnection dependency on RunLoop (Sanity check)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLConnection dependency on RunLoop (Sanity check)


  • Subject: Re: NSURLConnection dependency on RunLoop (Sanity check)
  • From: j o a r <email@hidden>
  • Date: Thu, 21 Jul 2005 23:28:30 +0200


On 21 jul 2005, at 21.23, Andrei Tchijov wrote:

NSURLConnection when used in asynchronous mode ( initWithRequest:delegate: ) starts couple threads to deal with actual IO but also register some inputs with RunLoop of the thread which created it. As a result, nothing will happen with such connection until that RunLoop had a chance to "run" (at least none of delegate methods are going to be invoked).

That sounds about right.

The way I solved this problem (feature) is by creating new thread each time I need to use NSURLConnection. Is there a better way?

What is your main thread doing? Why is it so busy? Usually you try to keep the main thread idle as much as possible, to allow it to be responsive to user events. But perhaps you're talking about some sort of command line utility?


Yes, you *could* of course solve the problem with a second thread, but it kind of defeats the whole purpose of this design. The point is that you shouldn't have to set up these extra threads yourself, and figure out how to communicate between them.

j o a r



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 dependency on RunLoop (Sanity check)
      • From: Andrei Tchijov <email@hidden>
References: 
 >NSURLConnection dependency on RunLoop (Sanity check) (From: Andrei Tchijov <email@hidden>)

  • Prev by Date: Re: Missing Core Data selector
  • Next by Date: Re: [Moderator] MUST READ: Posting private messages
  • Previous by thread: NSURLConnection dependency on RunLoop (Sanity check)
  • Next by thread: Re: NSURLConnection dependency on RunLoop (Sanity check)
  • Index(es):
    • Date
    • Thread