Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6605567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:17:56+00:00 2026-05-25T19:17:56+00:00

I have some textures and sound effects preloading I need to do asynchronously to

  • 0

I have some textures and sound effects preloading I need to do asynchronously to create a smooth user experience in an iOS game I am developing.

I am trying to decide between NSOperationQueue and NSThread to load these game resources during gameplay.

NSOperationQueue seems to be a clear winner and have numerous benefits, but I’m concerned about having effective priority control over this ‘background’ resource loading task, so that I can turn it down in terms of how many cycles it consumes so as not to affect frame-rates.

I see that NSOperationQueue has a concept of ‘priority’, but it looks different than NSThread’s concept of ‘priority’. Correct me if I’m wrong, but NSThread’s priority is in relation to other threads running on the system, and NSOperation’s priority is the priority of that task in relation to the other queued tasks.

What I want to know is….

Is there a way to control the priority of a given NSOperationQueue task in relation to how many cycles (as opposed to relative priority vs. other queued tasks) it can consume compared to other threads currently running on the device?

Is it safe within an NSOperationQueue’s task to change the current thread’s priority? (with NSThread’s +setPriority)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:17:57+00:00Added an answer on May 25, 2026 at 7:17 pm

    An instance of NSOperation also have a ‘setThreadPriority:’ method, along with ‘setQueuePriority:’.

    This is definitively what you are looking for.

    - (void)setThreadPriority:(double)priority
    

    The value you specify is mapped to the operating system’s priority values. The specified thread priority is applied to the thread only while the operation’s main method is executing. It is not applied while the operation’s completion block is executing. For a concurrent operation in which you create your own thread, you must set the thread priority yourself in your custom start method and reset the original priority when the operation is finished.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this game with some variety of textures. Whenever I draw a texture
I have some kind of test data and want to create a unit test
I'm a beginner in game development and game programming. I have experience in computer
I need to: draw 3d models with specific 3ds textures have the models be
In my 2D game I need textures that may be arbitrarily large, can be
every one, i have been doing some work on rendering grass using billboard textures
What I think I need to do is create some code that lets me
i have many textures to show on the screen, some of these textures may
I need to overlay some textures onto a video in a layered fashion (i.e.
I have some UI in VB 2005 that looks great in XP Style, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.