Andrew
Andrew

Reputation: 12010

Is an NSInvocationOperation generated operation complete when its selector finishes?

If I create an NSOperation via NSInvocationOperation, does completion of the chosen selector cause the NSOperation to complete and be removed from the operation queue?

For example:

...
NSDictionary* params = @{KEY_SERVER_ID:serverId, KEY_USERNAME:username, KEY_PASSWORD:password};
NSInvocationOperation* op = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(publishBulletinBoardRead:) object:params];
[[NSOperationQueue currentQueue] addOperation:op];
...

When publishBulletinBoardRead: returns, can I assume that the operation is removed from the queue?

Upvotes: 1

Views: 31

Answers (0)

Related Questions