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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:22:34+00:00 2026-05-15T02:22:34+00:00

in this sample , two threads created; a worker thread created by BeginInvoke and

  • 0

in this sample, two threads created; a worker thread created by BeginInvoke and an I/O completion thread created by SendAsync method.

but another author in his UnsafeQueueNativeOverlapped example, don’t recommend this.

i want to use SendAsync or …Async in an asp.net page and i want to use PageAsyncTask.
however, its BeginEventHandler requires AsyncResult to be returned which SendAsync does not return.

afaik, event based async pattern is the most recommended way so how could we call SendAsync or any …Async methods without creating two threads and hurting the performance?

  • 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-15T02:22:35+00:00Added an answer on May 15, 2026 at 2:22 am

    Actually if you used the beginIvoke and endInvoke for delegates or ThreadPool.WorkerItem it will not make any difference in your application because they are using the same thread that asp.net uses throw the iis
    so now you have only 2 solution to make async calls first u will write your own threading classes (but be careful )
    second use the PageAsyncTasks(recommended) this one much more safe and it’s designed to work perfectly with asp.net

    it’s not about hurting the performance as much as it’s about how and when to use asnyc tasks
    if your process really take much time until it finish (because IIS will wait until all processes finish even the asnyc ones then start rendering) then you have to go to async solution instead it will make a draw back in performance

    Note:

    there is a difference between AddOnPreRenderCompleteAsync and RegisterAsyncTask
    in there implementation they look the same but in the second one

    1. you have access to the current http
      context ,impersonation, culture and
      profile data etc
    2. you can run many tasks in parallel
    3. you have timeout event and you can
      determine timeout in the page
      attribute
    4. you can call RegisterAsyncTask
      several times in one request to
      register several async operations
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my sample application, I have basically two threads. The main thread contains a
This question has two parts (maybe one solution?): Sample vectors from a sparse matrix
This should be so simple, but I'm drawing a blank. I have two tables.
Can someone explain this simple, yet deceiving, anomaly? There are two models, where B
For example, in this simple function where fun1 takes as input two numbers, adds
Well this is a simple question i want to filter two elements sorted reverse
This is two questions in one, so here we go. I have a simple
I have simple form like this which accepts only two values string action and
Let's say I have two strings like this: XABY XBAY A simple regex that
I have a simple has_one/belongs_to relationship between two models. This is a new association

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.