> On 1 May 2015, at 3:53 pm, Graham Cox <graham....@bigpond.com> wrote:
> 
> It looks as if to be sure I’m going to have to drop down a level and create 
> my own NSOperations.

Well that’s an interesting result - creating my own NSOperation with a QoS of 
NSOperationQualityOfServiceBackground and adding it to my queue produces a 
perfectly smooth and non-blocking app. If I use -addOperationWithBlock: things 
are screwed up.

For [NSOperation qualityOfService] Apple says:

> The default value of this property is NSOperationQualityOfServiceBackground 
> and you should leave that value in place whenever possible.

But if I leave it at the default, the same blocking problem is apparent. 
Logging the default QoS, I see it’s -1, which equates to 
NSQualityOfServiceDefault. Setting it to NSOperationQualityOfServiceBackground 
things are fine. Therefore at the very least the documentation is incorrect. I 
do wonder if this isn’t actually a bug though - if something somewhere is 
interpreting -1 to mean a very high priority instead of a low one, that’s going 
to screw things up pretty badly all over the place.

I’d be interested to know if this has changed from 10.9 or earlier (I’m on 
10.10).


—Graham



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to