Is a serial NSOperationQueue FIFO?
Is a serial NSOperationQueue FIFO?
- Subject: Is a serial NSOperationQueue FIFO?
- From: Eric Hermanson <email@hidden>
- Date: Mon, 07 Sep 2009 00:32:08 -0400
When working with a serial NSOperationQueue (i.e.
setMaxConcurrentOperationCount==1), are the operations added to the
queue guaranteed to run in FIFO order if all operations have the same
priority and no operation dependencies are involved? My guess is that
the NSOperationQueue will run the operations in FIFO order, however, I
don't believe the NSOperationQueue documentation guarantees this. The
documentation says operations will run based on priority, then on
dependency structure. Because all operations in this aforementioned
serial queue have the same priority (i.e normal) and no dependencies,
then I suppose the NSOperationQueue could sort the operations any way
it wanted, not necessarily in the order I added them to the queue.
Does anyone have insight into this, or is there documentation anywhere
that can guarantee to me an NSOperationQueue with a concurrent
operation count of 1 will indeed process the operations first come
first serve?
_______________________________________________
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