开发者

NSURLConnection synchonous methods from within NSOperation

Suppose I have multiple NSOperation objects attached to a concurrent queue.

With开发者_运维技巧in these NSOperations, I would call a synchronous method of NSURLConnectionClass, sendSynchronousRequest ... just to not mess up my code with tracing different connections from within a single delegate.

Apple says that sendSynchronousRequest ... is going to automatically create a separate thread with a run loop to trace NSURLConnection delegate messages.

But I already have several additional threads (running inside NSOperation)! So the question is: if I have, say, 10 NSOperation objects and each would call the synchronous method of NSURLConnection, will it produce 10 more additional ("automatically created") threads with run loops or there will be only one for all of them?


Don't worry about the thread that NSURLConnection creates. It is some internal detail. I'm pretty sure it is one global thread shared by all NSURLConnection instances.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜