Reputation: 1657
If I call invoke
on NSInvocation
, is it the same as calling performSelector:
with the argument waitUntilDone:YES
? That is, does invoke
block the execution until the called selector is done?
In other words, are the two following code lines exactly the same?
// myInvocation is of type NSInvocation
[myInvocation invoke];
[myInvocation performSelectorOnMainThread:@selector(invoke) withObject:nil waitUntilDone:YES];
Upvotes: 0
Views: 203
Reputation: 52612
[NSInvocation invoke] is exactly the same as calling the message that the NSInvocation represents. Like any message call, it will do it on the current thread.
Upvotes: 3