RE: Executing a very low-priority operation in iOS
RE: Executing a very low-priority operation in iOS
- Subject: RE: Executing a very low-priority operation in iOS
- From: Julius Oklamcak <email@hidden>
- Date: Wed, 25 Apr 2012 20:50:27 -0400
> Normally I'd set up a timer to fire in a minute, set up an
NSBlockOperation,
> and let it go. When it finishes, I'd repeat the process. But I don't see
any
> way to adjust the priority of an NSOperationQueue.
NSBlockOperation inherits from NSOperation so you should be able to
-setQueuePriority: and/or -setThreadPriority: on it.
You could also use something like the following to run the block:
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND,
0),
^{
// ...
});
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden