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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:32:14+00:00 2026-05-31T21:32:14+00:00

I recently read an article about c#-5 and new & nice asynchronous programming features

  • 0

I recently read an article about c#-5 and new & nice asynchronous programming features . I see it works greate in windows application. The question came to me is if this feature can increase ASP.Net performance?

consider this two psudo code:

public T GetData()
{
    var d = GetSomeData();
    return d;
}

and

public async T GetData2()
{
    var d = await GetSomeData();   
    return d;
}

Has in an ASP.Net appication that two codes difference?

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-05-31T21:32:15+00:00Added an answer on May 31, 2026 at 9:32 pm

    Well for a start your second piece of code would return Task<T> rather than T. The ultimate answer is “it depends”.

    If your page needs to access multiple data sources, it may make it simpler to parallelize access to those sources, using the result of each access only where necessary. So for example, you may want to start making a long-running data fetch as the first part of your page handling, then only need the result at the end. It’s obviously possible to do this without using async/await, but it’s a lot simpler when the language is helping you out.

    Additionally, asynchrony can be used to handle a huge number of long-running requests on a small number of threads, if most of those requests will be idle for a lot of the time – for example in a long-polling scenario. I can see the async abilities being used as an alternative to SignalR in some scenarios.

    The benefits of async on the server side are harder to pin down than on the client side because there are different ways in which it helps – whereas the “avoid doing work on the UI thread” side is so obvious, it’s easy to see the benefit.

    Don’t forget that there can be a lot more to server-side coding than just the front-end. In my experience, async is most likely to be useful when implementing RPC services, particularly those which talk to multiple other RPC services.

    As Pasi says, it’s just syntactic sugar – but I believe that it’s sufficiently sweet sugar that it may well make the difference between proper asynchronous handling being feasible and it being simply too much effort and complexity.

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

Sidebar

Related Questions

Recently i read an article is about prevent brute-force attack. It said that automatically
I just recently heard of duck typing and I read the Wikipedia article about
I am new in flex and recently read about Validation and Invalidation in components
I have recently read an article about fast sqrt calculation. Therefore, I have decided
I've recently read an article http://www.ravelrumba.com/blog/static-cookieless-domain/ about Serving Static Content from a Cookieless Domain
I recently read this article Safe Thread Synchronization as I was curious about the
I`ve recently read this article about a user losing data on EC2 when dealing
I recently read an article that talked about the computation complexity of algorithms. The
I recently read Object Oriented Exception Handling in Perl Perl.com article. Is there any
Recently, I read an article entitled SATA vs. SCSI reliability . It mostly discusses

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.