• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSOperation Dispatch Thread Soft Limit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSOperation Dispatch Thread Soft Limit
      • From: Jens Alfke <email@hidden>
    • Re: NSOperation Dispatch Thread Soft Limit
      • From: Daniel Vollmer <email@hidden>
  • Prev by Date: Re: Debugging insight needed for NSKeyedUnarchiver
  • Next by Date: Re: Debugging insight needed for NSKeyedUnarchiver
  • Previous by thread: Re: Application size growing
  • Next by thread: Re: NSOperation Dispatch Thread Soft Limit
  • Index(es):
    • Date
    • Thread