Re: CPU sampling and +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:]
Re: CPU sampling and +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:]
- Subject: Re: CPU sampling and +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:]
- From: Joar Wingfors <email@hidden>
- Date: Fri, 13 Nov 2009 08:40:39 -0800
On 13 nov 2009, at 04.36, Paulo Andrade wrote:
> I'm guessing that when using a NSURLConnection the framework spawns a new thread and creates a runloop for it,
That sounds about right. I could also see that the framework might choose to keep this thread around after you've finished using it (in case you need it again later).
> this runloop just like the runloop on the main thread is constantly running even when I'm no longer using any NSURLConnection.
I don't believe this to be the case though. When not handling any input sources (sending / receiving data), I'd expect for this run loop (just like the run loop for the main thread) to be "parked", not consuming any (or at least not basically any) CPU.
How are you running your CPU profile (what is the configuration you're using when launching Instruments), and how are you filtering your data after collecting the sample? If you want more feedback, upload the whole sample instead of a screenshot next time.
j o a r
_______________________________________________
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