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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:46:10+00:00 2026-06-15T18:46:10+00:00

I’m implementing a download manager in cocoa. The user can add several download requests,

  • 0

I’m implementing a download manager in cocoa. The user can add several download requests, and the request manager will show the progress of the requests in a panel. I came into problem about the pause/resume of the request in the queue.

For simplicity, supposing the max concurrent operation count is 1, I add several requests with order:1, 2, 3,4,5. If it is not interrupted, the request is downloaded from 1 to 5 in sequence. Supposing I pause the request 1, the request 2 should continue to download. During that time, I resume the request 1. Hence, after the request 2 is finished, I hope the request 1 can be continued before request 3.

The problem here is that: For the single request when I paused it, the request in fact was cancelled. when I resumed the request, a new request was initialed and then started. In an operation queue, now I sent [self cancel] if the request was paused so that the next request could be started. However, I don’t know how to do if it is resumed. The canceled request cannot be added to the queue again. If I created a new one and add it to the queue, how can I promise the priority like the before?

Please give tips on how to do it.

thanks

  • 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-15T18:46:11+00:00Added an answer on June 15, 2026 at 6:46 pm

    Currently I make a solution myself using:

    1. make a custom request inherited from ASIHttpRequest;
    2. make a NAMutableArray to contain all the requests;
    3. If one request is added, enumerating the array to see if the maximum requests are executing.
      If not, start the request in its own queue. If exceeding the maximum, just add the request to the array, and set its status to waiting;
    4. If one request is finishing or failing, enumerating the array to see the request which is in the first position by adding time with a status waiting;
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I want to show the soap response to UIWebview.. my soap response is, <p><img
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Does anyone know how can I replace this 2 symbol below from the string
I need a function that will clean a strings' special characters. I do NOT
I have a view passing on information from a database: def serve_article(request, id): served_article
I am writing an app with both english and french support. The app requests
I need to clean up various Word 'smart' characters in user input, including 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.