NSURLDownload delegate methods seperate thread
> Date: Wed, 9 Sep 2009 09:57:45 -0700
>
>
> On Sep 9, 2009, at 8:35 AM, Colin Deasy wrote:
>
> > Ok so I have tried both ways, using the main thread for the download
> > messages and using NSOperationQueue to create separate th
On Sep 9, 2009, at 8:35 AM, Colin Deasy wrote:
Ok so I have tried both ways, using the main thread for the download
messages and using NSOperationQueue to create separate threads & run
loops.
I'm still getting 30% CPU though. When I run it, my app seems to
send the
kernel_task a bit crazy
From: Dave Carrigan [mailto:d...@rudedog.org]
Sent: 08 September 2009 22:12
To: Colin Deasy
Cc: cocoa-...@not-pc.com; cocoa-dev@lists.apple.com
Subject: Re: NSURLDownload delegate methods seperate thread
On Sep 8, 2009, at 1:43 PM, Colin Deasy wrote:
> Spot on, thanks man.
>
> F
On Sep 8, 2009, at 1:43 PM, Colin Deasy wrote:
Spot on, thanks man.
Fixed it using:
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate distantFuture]];
while ([self isDownloading] );
This will work, but you won't be able to know if your
NSInvocationQueue wants to cancel. If that's im
On Tue, Sep 8, 2009 at 1:43 PM, Colin Deasy wrote:
> So just blocks until finished the download. If I take away the while loop it
> doesn't run.Is there a better way?
Then why are you running in a separate thread at all? Why not just
run asynchronously on the main thread?
--Kyle Sluder
m; cocoa-dev@lists.apple.com
> From: d...@rudedog.org
> To: colde...@hotmail.com
> Subject: Re: NSURLDownload delegate methods seperate thread
> Date: Tue, 8 Sep 2009 12:55:33 -0700
>
>
> On Sep 8, 2009, at 12:36 PM, Colin Deasy wrote:
>
> > Well I did try that
On Sep 8, 2009, at 12:36 PM, Colin Deasy wrote:
Well I did try that but there were no callbacks. That is I initiated
the download in the start method of an NSOperation.
You likely have no run loop running on the thread. You need that for
NSURLConnection to do its work.
--
Dave Carrigan
Well I did try that but there were no callbacks. That is I initiated the
download in the start method of an NSOperation.
> Subject: Re: NSURLDownload delegate methods seperate thread
> From: cocoa-...@not-pc.com
> Date: Tue, 8 Sep 2009 13:17:55 -0600
> CC: cocoa-dev@lists.apple.com
On Sep 8, 2009, at 1:03 PM, Colin Deasy wrote:
Hey,
Is anyone aware of a way to receive NSURLDownload's delegate methods
on a separate thread, i.e. not the main one?
"Delegate messages will be sent on the thread which calls this method."
So, start your NSURLDownload on whichever thread you
Hey,
Is anyone aware of a way to receive NSURLDownload's delegate methods on a
separate thread, i.e. not the main one? I am using an NSOperationQueue to
manage them but at the moment I need to use the performSelectorOnMainThread
method to get it too work. The problem with this is that it drives
10 matches
Mail list logo