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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:22:08+00:00 2026-06-18T16:22:08+00:00

We use AFNetworking ( https://github.com/AFNetworking/AFNetworking ) in our app and NSOperationStack ( https://github.com/nicklockwood/NSOperationStack )

  • 0

We use AFNetworking (https://github.com/AFNetworking/AFNetworking) in our app and NSOperationStack (https://github.com/nicklockwood/NSOperationStack) to set dependencies so that last operation gets priority over the rest in the queue (stack behavior). I am running into an issue when ‘start’ method of AFURLConnectionOperation gets called, but operation’s ‘isReady’ method returns NO because of the dependencies. This makes ‘start’ exit immediately. After the very first attempt to start operation, ‘start’ method never gets called again, thus the operation never reaches isFinished state, never gets deleted from the queue and eventually operations like that jam the queue. I would appreciate any thought on this matter. Thank you!

More info: none of the operations got cancelled and i don’t see any dependency circles in the queue.
We use setLIFODependendenciesForOperation on existing operationQueue not changing AFNetworking code: [self.operationQueue setLIFODependendenciesForOperation:operation];

Update: Now, thinking more about it, is it possible to have zero dependencies at one point and having isReady return YES when NSOperationQueue decides that operation is ready, but, by the time, start() gets invoked the number of dependencies changes to 1 or more.

  • 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-18T16:22:09+00:00Added an answer on June 18, 2026 at 4:22 pm

    This sounds like an issue with the 'NS'OperationStack Github project that you are using.

    Changing NSOperation dependancies after they have been added to the NSOperationQueue is specifically advised against in the documentation:

    Important You should always configure dependencies before running your operations or adding them to an operation queue. Dependencies added afterward may not prevent a given operation object from running. (From: Concurrency Programming Guide: Configuring Interoperation Dependencies)

    I think a better approach would be to maintain your own LIFO stack outside the operation queue and use the finishing of one operation to trigger the queuing of the next most important operation.

    Or if you don’t need to be strict perhaps you could use -[NSOperation setPriority:] to prioritise the later operations over the earlier ones.

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

Sidebar

Related Questions

AFNetworking default runLoopModes is NSRunLoopCommonModes.I want use NSDefaultRunLoopMode,and set it operation.runLoopModes = [NSSet setWithObject:NSDefaultRunLoopMode];
I use AFNetworking as my connection lib to my app. Due to the back-end
The documentation for AFNetworking notes that you should create subclass of AFHTTPClient and use
in my Iphone app i use AFNetworking to POST some data to a webservice
I am trying to update my app to use AFNetworking but the webservice I
I use AFNetworking in my app for every request (like login, get data from
I am making a project that uses the AFNetworking Library. I use it to
In my iPhone app, I am using AFNetworking to make HTTP requests to a
I have a use case that should be rather common but I can't find
I'm currently migrating my app from using ASIHTTPRequest to AFNetworking. I know synchronous requests

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.