• 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 Doesn't Remove itself from run loop when done?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLConnection Doesn't Remove itself from run loop when done?


  • Subject: Re: NSURLConnection Doesn't Remove itself from run loop when done?
  • From: Quinn <email@hidden>
  • Date: Tue, 6 Oct 2009 10:52:48 +0100

At 23:10 -0700 5/10/09, Jerry Krinock wrote:
Although I can't find this documented, I expect from "common sense" that NSURLConnection would remove itself as a run loop input source when it is cancelled, which should cause -[NSRunLoop runMode:beforeDate] to return NO since it has no other input sources, and my while() loop to exit. Why am I wrong?

I'm not entirely sure what's going on here, but in general I wouldn't rely on this "no sources so the runloop quits" behaviour. There are too many ways that oddball sources can get added to the runloop.


If you really want to debug this, you can use CFShow of CFRunLoopGetCurrent to see what's actually attached to the runloop.

Finally, is adding a little isDone condition in that while() loop the correct way to fix this?

Yes. That's the approach I'd recommend.

S+E
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSURLConnection Doesn't Remove itself from run loop when done?
      • From: Jerry Krinock <email@hidden>
References: 
 >NSURLConnection Doesn't Remove itself from run loop when done? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: NSURLConnection Doesn't Remove itself from run loop when done?
  • Next by Date: Re: NSURLConnection Doesn't Remove itself from run loop when done?
  • Previous by thread: NSURLConnection Doesn't Remove itself from run loop when done?
  • Next by thread: Re: NSURLConnection Doesn't Remove itself from run loop when done?
  • Index(es):
    • Date
    • Thread