Limit the number of asyn web service calls

Discussion in 'ASP .Net Web Services' started by Paul Welter, Nov 4, 2003.

  1. Paul Welter

    Paul Welter Guest

    I have a web service the makes calls asynchronously to a server to download
    files. The user has the ability to select many files to download. When
    making the web service call using the proxy class, the async call goes on
    the thread pool. The problem is that the thread pool can have 25 threads.
    So, the user could potentially be downloading 25 files at a time. This will
    overwhelm the clients internet connection. I'd like to find an easy way to
    limit the number of async calls while queuing the rest without blocking the
    UI thread. How do I change the number of threads the thread pool can have?
    Do I have to implement my own thread pool? If so, how would I do that and
    how would I tell the proxy class to use my thread pool?

    thanks
    Paul
     
    Paul Welter, Nov 4, 2003
    #1
    1. Advertising

  2. Paul Welter

    MSFT Guest

    Hi Paul,

    The ThreadPool class in .NET only support to set minthread number, not with
    maxthreads number. I think you may consider create a queue object in your
    application, when user want to download files, you may add the file list to
    the queue component and let this component to control the number of files
    which will be download at same time. Will this help on the situation?

    Luke
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    MSFT, Nov 5, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Isaias Formacio Serna

    Web Service that calls an external Web Service

    Isaias Formacio Serna, Jan 28, 2004, in forum: ASP .Net Security
    Replies:
    5
    Views:
    273
  2. Replies:
    1
    Views:
    252
    Joe Kaplan \(MVP - ADSI\)
    Jun 14, 2006
  3. Multiple web service calls from web service

    , Jan 5, 2006, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    200
    Rodrigo García
    Jan 9, 2006
  4. Eustaquio Rangel de Oliveira Jr.

    Asyn sockets

    Eustaquio Rangel de Oliveira Jr., Mar 17, 2005, in forum: Ruby
    Replies:
    6
    Views:
    133
  5. Todd  English

    Perl Asyn

    Todd English, Sep 27, 2006, in forum: Perl Misc
    Replies:
    19
    Views:
    260
    -berlin.de
    Oct 4, 2006
Loading...

Share This Page