How do I prioritize performSelectorOnMainThread against NSConnection messages?
I have a lot of NSURLConnection
s downloading. They may not happen on the main thread. When some of them finish, I call performSelectorOnMainThread
for a separate singleton object.
I've used both forms of performSelectorOnMainThread
, specifying the run loop mode (NSDefaultRunLoopMode
) and 开发者_如何学Gonot specifying it. NSDefaultRunLoopMode
is supposed to avoid NSConnection
selectors, but the message still appears to be gated on them. The indicated selector is not performed until after all the pending connections have been completely downloaded.
How do I prioritize performSelectorOnMainThread
to happen before the others?
Turns out I had another connection gating the one I had prioritized - performSelectorOnMainThread was not the problem.
精彩评论