I'm trying to automatically re-queue an NSInvocationOperation to an NSOperationQueue every n seconds, but I can't get it to work.
For the purpose of serializing exclusive access to a specific resource, I have a single-threaded background NSOperationQueue with parameters: - maxConcurrentOperationCount = 1 - qualityOfService = NSOperationQualityOfServiceBackground I enqueue a resource-accessing status-sensing NSInvocationOperation onto the queue. - If it detects good status, it re-queues itself to the queue *after 60 seconds*. In the meantime, the queue should be empty for user jobs that may wish to access the resource. - If it detects bad status, it performs whatever actions necessary (may take many minutes). When done, it re-queues itself to the queue *after 60 seconds*. I've tried -performSelector:withObject:afterDelay: within the NSInvocationOperation but it does nothing. If I directly re-queue the NSInvocationOperation, of course it runs again immediately. Is there a way to do this? -Carl _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com