On Apr 25, 2012, at 17:50 , Julius Oklamcak wrote:

>> 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.

-setQueuePriority:, I think, only adjusts the priority of that operation 
relative to other operations on that queue.

But -setThreadPriority: is obvious; I didn't even see it there, despite staring 
right at it.

Thanks!
-- 
Rick

> 
> 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 protected])

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 [email protected]

Reply via email to