Note that there are some explanatory texts on larger screens.

plurals
  1. POHow many models of Asyncronous development in .NET?
    text
    copied!<p>I am learning asynchronous programming using C# and I usually use <code>BeginInvoke</code>, but I am not very sure about the other methods of creating asynchronous application.</p> <p>I have asked a question about this,see below link for more details:</p> <p><a href="https://stackoverflow.com/questions/8789544/how-to-return-t-value-from-begininvoke">How to return T value from BeginInvoke?</a></p> <p>In above link, Gravell said that there are four models of asynchronous development </p> <blockquote> <p><em>There's at least 4, then - a regular callback (non-APM, non-EAP) is also not uncommon</em></p> </blockquote> <p>But Overflow said that there are three:</p> <p>There are 3 models of asynchronous development in .NET</p> <ul> <li><p><strong>APM</strong> - (<code>BeginXXX</code> / <code>EndXXX</code>) which you are using here, when the long running task completes, it calls back into your code in the <code>EndXXX</code> method </p></li> <li><p><strong>EAP</strong> - Event based. In this model, when the long running task completes, an event is raised to inform your code.</p></li> <li><p><strong>TPL</strong> - New in .NET 4, this is the Task-based version. It looks most like synchronous programming to client code, using a fluent interface. Its calls back to your code using <code>ContinueWith</code>.</p></li> </ul> <p>Anyone can help me on this? </p> <p>I have searched google.com a lot, but actually they are using <code>BeginInvoke</code> most. thanks for your help.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload