Yes, I meant GCD. Sorry I missed the part where you told us about supporting
10.5 in your original message.
On 6 sept. 2012, at 20:55, Dan S wrote:
> if you meant using the grand central dispatch, i think that only became
> available in 10.6, I need to support this for 10.5
>
> On Thu, Sep 6
On Sep 6, 2012, at 1:21 PM, Dan S wrote:
> I can return from
> the routine without completing the request, while the caller will be kept
> blocked on that request untill I respond with URLProtocolDidFinishLoading
Well, the caller probably won’t be blocked, since it should be using an async
API
hehe, yes thank you, I was definatelly treating -startLoading it as the end
all call. So, following your suggestion, to avoid
calling URLProtocolDidFinishLoading from the thread, what would be
preferable for calling it from main thread? performSelectorOnMainthread or
listening to threadWillTernina
doh! I've been treating -startLoading as a sync routine that must return a
final result to the caller, and just now realized that I can return from
the routine without completing the request, while the caller will be kept
blocked on that request untill I respond with URLProtocolDidFinishLoading
(a
On Sep 6, 2012, at 11:25 AM, Dan S wrote:
> I will try to offload the server access to a different thread (though I
> still need to block the protocol thread because I still have to return the
> correct data for the current call).
No — as I said before, you should _never_ block the protocol-han
if you meant using the grand central dispatch, i think that only became
available in 10.6, I need to support this for 10.5
On Thu, Sep 6, 2012 at 11:25 AM, Dan S wrote:
> No, actually I've completely missed that it was answered. Thank you.
>
> Unfortunatelly, the requester is expecting a retur
No, actually I've completely missed that it was answered. Thank you.
Unfortunatelly, the requester is expecting a return data, error or a
redirect. And until the api can be respeced, the sync response has to stay
in. It isn't that it needs to load from network every request, but some
volotile da
Hi,
Fritz Anderson is right. We can only agree.
And recently, they made following Jens Alfke's advice incredibly easy.
Just post a block to one of the available dispatch queues (not the one running
on your main thread thought) and let it run its curse.
Jean
On 6 sept. 2012, at 16:36, Fritz A
From what Google tells me, you got a prompt response from Jens Alfke, a very
experienced Cocoa-networking programmer, explaining why what you're doing
shouldn't be expected to work. Are you looking for a workaround, or just for
somebody who will give you better news? I don't think better news is
Hello, is there a recomendation of a better list for this question ?
- Original Message -
From: "danchik"
To:
Sent: Thursday, August 02, 2012 3:33 PM
Subject: NSData DataWithContentsOfURL within a protocol handler
Hello, I was callingNSData *data = [NSData DataWithContentsOfURL:url.
On Aug 29, 2012, at 12:42 PM, danchik wrote:
> Seems like it is waiting for me to return before it will process the
> command, is there a way I can make a syncronouse url content pull from
> within the -startLoading protocol handler?
Don't do that. Never block the URL-loading thread, or you'll
11 matches
Mail list logo