I'm executing some code within some NSOperation
objects managed by an NSOperationQueue
. The code also contains a delayed method call using performSelector:withObject:afterDelay:
.
The problem is, that the corresponding selector which should be called delayed, is not called at all.
Having read this answer to a StackOverflow question, I guess it's due to the fact that the NSOperation
already has finished and its thread doesn't even exist anymore, "forgetting" the scheduled call to the selector.
How can I work around this?
How can I do a delayed call to a method within an NSOperation
?