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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:47:35+00:00 2026-05-13T21:47:35+00:00

Does ASIHTTP support multi thread? If sure, I hope each thread link to aUIProgressbar,

  • 0

Does ASIHTTP support multi thread?
If sure, I hope each thread link to aUIProgressbar, how can I construct the codes?

Thanks

interdev

  • 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-13T21:47:35+00:00Added an answer on May 13, 2026 at 9:47 pm

    Yups, ASIHttpRequest can handle more than on request at a time. See the help documentation and do notice this part.

    Using a queue

    This example does the same thing
    again, but we’ve created an
    NSOperationQueue for our request.

    Using an NSOperationQueue (or
    ASINetworkQueue, see below) gives you
    more control over asynchronous
    requests. When using a queue, only a
    certain number of requests can run at
    the same time. If you add more
    requests than the queue’s
    maxConcurrentOperationCount property,
    requests will wait for others to
    finish before they start.

    • (IBAction)grabURLInTheBackground:(id)sender
      { if (![self queue]) {
      [self setQueue:[[[NSOperationQueue alloc]
      init] autorelease]]; }
      NSURL *url = [NSURL URLWithString:@”http://allseeing-i.com“];
      ASIHTTPRequest *request =
      [ASIHTTPRequest requestWithURL:url];
      [request setDelegate:self];
      [request
      setDidFinishSelector:@selector(requestDone:)];
      [request
      setDidFailSelector:@selector(requestWentWrong:)];
      [[self queue] addOperation:request];
      //queue is an NSOperationQueue }

    • (void)requestDone:(ASIHTTPRequest *)request { NSString *response = [request responseString]; }

    • (void)requestWentWrong:(ASIHTTPRequest
      *)request { NSError *error = [request error]; }

    In the above sample, ‘queue’ is a
    retained NSOperationQueue property of
    our controller.

    We’re setting custom selectors that
    will be called when the request
    succeeds or fails. If you don’t set
    these, the defaults (requestFinished:
    and requestFailed:) will be used, as
    in the previous example.

    Handling success and failure for
    multiple requests

    If you need to handle success and
    failure on many different types of
    request, you have several options:

    1. If your requests are all of the same broad type, but you want to
      distinguish between them, you can set
      the userInfo NSDictionary property of
      each request with your own custom data
      that you can read in your finished /
      failed delegate methods.
    2. If you need to handle success and failure in a completely different
      way for each request, set a different
      setDidFinishSelector /
      setDidFailSelector for each request
    3. For more complex situations, or where you want to parse the response
      in the background, create a minimal
      subclass of ASIHTTPRequest for each
      type of request, and override
      requestFinished: and failWithProblem:.

    Hope this helps.

    Thanks,

    Madhup

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

Sidebar

Ask A Question

Stats

  • Questions 402k
  • Answers 402k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer what is game.test.gameEngine? Does it extend the View class? If… May 15, 2026 at 4:51 am
  • Editorial Team
    Editorial Team added an answer Just write the comparator: bool my_comparator(const std::vector<double>& lhs, const std::vector<double>&… May 15, 2026 at 4:51 am
  • Editorial Team
    Editorial Team added an answer In Pharo, the method you're looking for is ClassDescription>>allMethodsInCategory:: |… May 15, 2026 at 4:51 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.