开发者

Should NSURLProtocol::startLoading be asynch

I am subcla开发者_开发技巧ssing NSURLProtocol.

Do get parallel performance, need I spawn the loading to a separate thread in startLoading, or is this handled for me by the URL loading framework (WebKit)?


This is handled for you by the URL Loading System.


Actually. I found that if your -startLoading method takes too much time (where too much can already be just loading a file from the filesystem), you get weird crashes with stacktraces which are completely unhelpful.

The only way to battle this is to dispatch_async yourself first thing and do any non-trivial work there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜