Re: NSOperationQueue
Re: NSOperationQueue
- Subject: Re: NSOperationQueue
- From: Kyle Sluder <email@hidden>
- Date: Sat, 02 Jun 2012 09:18:04 -0700
On Jun 2, 2012, at 9:04 AM, Charles Srstka <email@hidden> wrote:
>
> It’s even easier than that, since there’s no need to de-prioritize anything. You just have everything’s priority set to NSOperationQueuePriorityNormal at the time of enqueuing, and give NSOperationQueuePriorityHigh or NSOperationQueuePriorityVeryHigh to the ones that need to be bumped to the front. The run-of-the-mill operations can stay normal; the only ones you need to change the priority for are the ones you want to prioritize.
>
> The OP mentioned that this won’t work because he’s giving all the operations the highest priority level, but there’s really no reason to do so. Just give the normal operations normal priority.
The OP's point is that the priority of operations changes over time, based on where the user has scrolled: onscreen previews need to be generated before offscreen ones.
The solution to changing priorities is… just change the priority.
--Kyle Sluder
_______________________________________________
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