• 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
Executing a very low-priority operation in iOS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Executing a very low-priority operation in iOS


  • Subject: Executing a very low-priority operation in iOS
  • From: Rick Mann <email@hidden>
  • Date: Wed, 25 Apr 2012 17:32:10 -0700

We have an app whose main function (on the main runloop) operates on a timer at about 30 Hz (eventually triggering a display update).

We want to run a separate period function on the order of once a minute. The operation itself is lengthy, and I want it to not impact the main function of the app. I want it to run on a thread of lower priority, so that it is interrupted every time our timer fires, and that our main runloop is never preempted in favor of the lower-priority task.

Normally I'd set up a timer to fire in a minute, set up an NSBlockOperation, and let it go. When it finishes, I'd repeat the process.

But I don't see any way to adjust the priority of an NSOperationQueue.

Do I need to create my own NSThread for this? Can I get at the thread of an NSOperationQueue and adjust its priority? I didn't think an NSOperationQueue was guaranteed to always run on the same thread.

Thanks,

--
Rick


_______________________________________________

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: Executing a very low-priority operation in iOS
      • From: Julius Oklamcak <email@hidden>
  • Prev by Date: Re: WWDC
  • Next by Date: Re: WWDC
  • Previous by thread: [Moderator] Re: WWDC
  • Next by thread: RE: Executing a very low-priority operation in iOS
  • Index(es):
    • Date
    • Thread