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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:07:40+00:00 2026-05-27T10:07:40+00:00

I am using NSInvocationOperation with NSOperationQueue developing in iOS5. According to apple documentation on

  • 0

I am using NSInvocationOperation with NSOperationQueue developing in iOS5.
According to apple documentation on invocation objects:

The NSInvocationOperation class is a concrete subclass of
NSOperation… This class implements a non-concurrent operation.

Ok, so my NSInvocationOperation object executes synchronously? (correct me here) Apple’s docs also says on operation queue objects:

In iOS, operation queues do not use Grand Central Dispatch to execute
operations. They create separate threads for non-concurrent operations
and launch concurrent operations from the current thread.

I am using the NSInvocationObject, which is a non-concurrent object, and adding it to to the operation queue like so:

[operationQueue addOperation:operation];

so my question is: 1) Since the operation queue will be spawning a separate thread to execute the NSInvocationObject as it says in the docs, will it be run asynchronously instead of synchronously?

[UPDATE – in response to Dani’s answer below. Taken from an Apple link.

NSOperation and NSOperationQueue

There are a number of different ways that you can use NSOperation, but
the most common is to 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.)

If you need more control over threading and the run-time environment
of your operations, you can make use of concurrent operations. To do
this, you subclass NSOperation and override the start method. In the
start method, you can spawn threads and setup the environment before
calling the main method. You are also required to maintain the state
of the NSOperation by setting properties like isExecuting and
isFinished. In short, concurrent operations give you a lot more
control, but also demand more effort—for most tasks non-concurrent
operations suffice.

  • 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-27T10:07:41+00:00Added an answer on May 27, 2026 at 10:07 am

    If you add it to an operation queue it will run asynchronously with respect to the rest of your code, but synchronously on the operation queue.
    It’s pretty much like:

    With synchronous objects:
    
    Creating thread
        |
        |\
        | \______
        |        |
        |       Operation A
        |        |
        |       Operation B
        |        |
        |        |
    
    With asynchronous objects:
    
    Creating thread
        |
        |\
        | \___________________
        |                     |
        |\                  Operation A
        | \______             |
        |        |            |
        |       Operation B   |
        |        |            |
        |        |            |
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my application, I'm using NSOperationQueue and NSInvocationOperation objects to execute all the operations.
I am adding operations to the queue using something like this NSInvocationOperation *operation0 =
Im using a threading class (.h/.m below) where the subclass is UIViewcontroller works without
Using JDeveloper , I started developing a set of web pages for a project
Using C#, I need a class called User that has a username, password, active
I'm using NSOperationQueue to manage a phase of an iOS application which is quite
I am trying to perform a method in a background thread using a NSOperationQueue
I am trying to implement search on a background thread using NSOperation on iOS
using file_get_contents , I open an Internet URL and get the contents of this
using the jquery ui modal dialog , the background shades grey (i assuming this

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.