NSOperation Dispatch Thread Soft Limit
NSOperation Dispatch Thread Soft Limit
- Subject: NSOperation Dispatch Thread Soft Limit
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Mon, 03 Mar 2014 15:43:55 +0700
I have a MyOperation, subclass of NSOperation.
MyOperation does:
create an NSOperationQueue
add a few MyOperations to this queue
waitUntilAllOperationsAreFinished
(obviously this recursion stops at some point - I do not create an infinite number of operations).
The good thing: this is very energy saving: cpu utilisation = 0%
The bad thing: nothing gets done.
Using Activity Monitor to sample my app I see:
"Dispatch Thread Soft Limit: 64 reached in 2152 of 2152 samples -- too many dispatch threads blocked in synchronous operations"
Using trial and error, I managed to not create too many operations, so that this blocking does not happen anymore.
But: Is there some way to find out programmatically at which point my app should stop adding operations?
Either with NSOperationQueue or GCD.
10.9.2
Gerriet.
_______________________________________________
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