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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T06:53:16+00:00 2026-05-21T06:53:16+00:00

I have an ASP.NET MVC 3 application. I’m using AsyncController and creating new threads.

  • 0

I have an ASP.NET MVC 3 application. I’m using AsyncController and creating new threads. Is there a way to validate that I’m using I/O completion ports instead of ASP.NET Thread Pool?

Is there a property in Thread.CurrentThread or someplace else that I can check to identify where the thread is running?

Here a example of the code that I’m executing

public class HomeController : AsyncController
{
    public void CarsComplexAsync(string make)
    {
        AsyncManager.OutstandingOperations.Increment(2);

        System.Diagnostics.Debug.WriteLine("Enter CarsComplexAsync: " + DateTime.Now);

        Action getCarsAsync = () =>
        {
            List<Car> cars = CarService.GetCars(make);
            AsyncManager.Parameters["cars"] = cars;
            AsyncManager.OutstandingOperations.Decrement();    
        };


        Action getTrucksAsync = () =>
        {
            List<Car> trucks = CarService.GetTrucks(make);
            AsyncManager.Parameters["trucks"] = trucks;
            AsyncManager.OutstandingOperations.Decrement();
        };


        getCarsAsync.BeginInvoke(null, null);
        getTrucksAsync.BeginInvoke(null, null);
    }

public ActionResult CarsComplexCompleted(List<Car> cars, List<Car> trucks)
{
cars.AddRange(trucks);
return View(cars);
}

public static class CarService
{
    private static List<Car> _cars = new List<Car>
                {
                    new Car{ Make = "Ford", Model = "F-150", Color = "White", Year = 2010},
                    new Car{ Make = "Chevy", Model = "Camero", Color = "Black", Year = 1984},
                    new Car{ Make = "Peugeot", Model = "406 Coupe", Color = "White", Year = 2010},
                    new Car{ Make = "Dodge", Model = "Charger", Color = "Red", Year = 1974}
                };

    public static List<Car> GetCars(string model)
    {
        Thread.Sleep(5000);
        List<Car> cars = _cars;
        return cars;
    }

    public  static List<Car> GetTrucks(string make)
    {
        Thread.Sleep(5000);
        List<Car> cars = _cars;
        return cars;
    }
}
  • 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-21T06:53:16+00:00Added an answer on May 21, 2026 at 6:53 am

    Is there a way to validate that I’m using I/O completion ports instead of ASP.NET Thread Pool?

    Not without seeing your code as it will depend on the APIs you are using.

    For example HttpWebRequest.BeginGetResponse uses I/O Completion Ports. On the other hand if you have some CPU intensive task that you are running on a separate thread that you’ve created manually then you are not using I/O Completion Ports.

    Is there a property in Thread.CurrentThread or someplace else that I can check to identify where the thread is running?

    A Completion Port means that there is no thread because if there was a thread its as if you were running on a thread. Basically the way I/O Completion Ports work is that you start some I/O operation and a CP is registered with it, then you free all threads and return. During the execution of the operation there are no threads in your application associated to it. Once the operation completes the port is signaled and a thread is cretad/drawn from the pool to end the request.

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

Sidebar

Related Questions

I have an asp.net MVC application. There is an entity called File that it
I have an ASP.NET MVC application using Authorization Attributes on Controllers and Actions. This
I have an Asp.Net MVC application that works in the vs.net development web server.
I have a ASP.NET MVC application using NHibernate and the application runs fine when
I have a ASP.NET MVC application that runs in both IIS 6 and 7.
I have an ASP.Net MVC application and I'm using Forms authentication in SQL Server.
I have ASP.NET MVC application that has list with jQuery Selectable list. My problem
I have an ASP.NET MVC application, with some RESTful services that I'm trying to
I have an ASP.Net-MVC application that is mostly complete. However, I have one page
I have a ASP.NET MVC application. The code in the aspx is like that

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.