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

  • SEARCH
  • Home
  • 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 6383045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:36:01+00:00 2026-05-25T02:36:01+00:00

My app uses an NSOperationQueue to cache thumbnail images in a background thread. On

  • 0

My app uses an NSOperationQueue to cache thumbnail images in a background thread. On the iPad2 I can push the concurrent task count limit up to 5 or 6, but on single core devices like the iPad 1 this brings the UI to a grinding halt.

So, I’d like to detect a dual core device (currently only iPad 2) and adapt the concurrent limit appropriately. I know I’m not supposed to check model numbers, rather device features. So what device feature should I be looking for that would tell me whether the cpu is dual core?

  • 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-25T02:36:02+00:00Added an answer on May 25, 2026 at 2:36 am

    Method 1

    [[NSProcessInfo processInfo] activeProcessorCount];
    

    NSProcessInfo also has a processorCount property. Learn the difference here.

    Method 2

    #include <mach/mach_host.h>
    
    unsigned int countCores()
    {
      host_basic_info_data_t hostInfo;
      mach_msg_type_number_t infoCount;
    
      infoCount = HOST_BASIC_INFO_COUNT;
      host_info( mach_host_self(), HOST_BASIC_INFO, (host_info_t)&hostInfo, &infoCount ) ;
    
      return (unsigned int)(hostInfo.max_cpus);
    }
    

    Method 3

    #include <sys/sysctl.h>
    
    unsigned int countCores()
    {
      size_t len;
      unsigned int ncpu;
    
      len = sizeof(ncpu);
      sysctlbyname ("hw.ncpu",&ncpu,&len,NULL,0);
    
      return ncpu;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background: Our web app uses the jquery.constrain.js plugin to handle data entry in some
My Django 1.1 app uses dynamic images. I'm confused about why the path generated
My app uses a simple SQLite database. Everything works fine I can now present
My App uses one service in the background. To share data between the UI
Our app uses Rails.cache in the controller to cache some items outside the scope
My Java app uses a java.util.concurrent.Executors.newCachedThreadPool() to launch a number of different threads that
My app uses badge to count the number of smoked cigarettes in the current
My WinForms app uses the mouse wheel, subscribing to the Control.MouseWheel event. How can
My app uses a WebRequest at certain points to get pages from itself. This
Our app uses a component that requires a license file in the directory with

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.