Re: NSURLConnection Doesn't Remove itself from run loop when done?
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