Re: NSOperationQueue
Re: NSOperationQueue
- Subject: Re: NSOperationQueue
- From: Charles Srstka <email@hidden>
- Date: Sat, 02 Jun 2012 12:21:19 -0500
On Jun 2, 2012, at 11:54 AM, Markus Spoettl wrote:
> I'm still not seeing how queuePriority would solve the issue. Say you have a queue with maxConcurrentOperationCount == 1
>
> 1) You add operation (A), it starts executing
>
> 2) You add operation (B), (C), (D), (E), (F), (G), (H) and (I) in that order. All wait
>
> Please explain how you suggest to use queuePriority in order to ensure the waiting operations will execute in the reverse order:
>
> (I), (H), (G), (F), (E), (D), (C), (B).
Who cares if they execute in reverse order? Pedantry like the exact order that the operations execute in is not important in practice. The important issue here is that some operations — i.e. loading the objects on screen — need to have a higher priority than other operations — i.e. loading objects that aren’t on screen. Giving the important operations a high priority solves this quite well.
If A still executing is a problem (I think it wouldn’t be unless the operation was particularly lengthy), then just cancel and re-add A, maybe giving A some way of saving and restoring its state.
Charles
_______________________________________________
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