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 8908875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:17:39+00:00 2026-06-15T03:17:39+00:00

From: Apple docs on managing concurrency : NsOperation Write a custom subclass and override

  • 0

From: Apple docs on managing concurrency:

NsOperation

Write a custom subclass and override one method: main. The main method gets called to perform the operation when the NSOperationQueue schedules it to run. NSOperation classes written in this way are known as non-concurrent operations, because the developer is not responsible for spawning threads—multi-threading is all handled by the super class. (Don’t be confused by the terminology: just because an operation is non-concurrent, does not mean it cannot be executed concurrently, it simply means that you don’t have to handle the concurrency yourself.)

I think overriding main is the easiest way to use NSOperation, but the apple site says its non-concurrent does it mean that the nsoperations in the nsoperation queue(when only overriding main) would execute serially?

I don’t want to execute my operations serially, but I want to get my operations parallel with as minimum effort as possible.

  • 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-06-15T03:17:41+00:00Added an answer on June 15, 2026 at 3:17 am

    No, they will not necessarily be run serially. Just as the paragraph you quoted noted, it “does not mean it cannot be executed concurrently”.

    So what does determine if they can run in parallel? The NSOperationQueue and any dependencies you set up between the ops. A little later in that same document, the section entitled “Running Operations” explains:

    • you can specify (limit) the number of threads the queue will spawn, and
    • “NSOperationQueue will automatically determine how many threads it should spawn.”

    And in the Concurrency Programming Guide it elaborates:

    In most cases, operations are executed shortly after being added to a queue, but the operation queue may delay execution of queued operations for any of several reasons. Specifically, execution may be delayed if queued operations are dependent on other operations that have not yet completed. Execution may also be delayed if the operation queue itself is suspended or is already executing its maximum number of concurrent operations.

    What you do give up by using non-concurrent operations is that the operation itself isn’t intended to set up new threads, etc.

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

Sidebar

Related Questions

Both updates come from the same delegate method (locationManager:didUpdateToLocation:fromLocation:). In Apple docs they write
From reading the Apple Docs on Core Data, I've learned that you should not
In docs link about expires # Task expires after one minute from now. add.apply_async(args=[10,
From Apple's Obj-C documentation: If the method returns an object, then a message sent
From apple doc subview(near to the screen) gets to handle a touch event first
Downloaded Reachability from Apple, using this method to check for an active connection: -(BOOL)isReachable{
In the BubbleLevel example from apple they implement an +initialize method. They say: +initialize
When I look at apple docs, I get a bit confused. On one hand
This is from apple blocks docs and I am having difficulty understanding this please
sound = [[NSSound alloc] initWithContentsOfFile:@staticbeam09.wav byReference:YES]; Code referenced from Apple docs . Getting an

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.