MyI have an NSOperationQueue with NSOperation objects in it
NSOperationQueue *aQueue = [[ NSOperationQueue alloc ] init];
[aQueue setMaxConcurrentOperationCount:3];
for (int index=0; index<=5; index++) {
MYOperation *anOperation = [[MYOperation alloc] init];//MYOperation subclass from NSOperation
[aQueue addOperation:anOperation];
}
NSLog(@"Number of Operations:%d",[aQueue operationCount]);//It gives 5 count
The queue only allows to executes 3 operation at a time(as per definition). When i try to add 4th operation, it adds to Queue, but the operation is never executed and it is discarded.
Ques: Why the Queue discards operation more than its concurrence values?