I have been reading about the Asynchronous Programming Model in Jeffrey Rithcer's book CLR via C#. I have really enjoyed reading it and i thought of writing something about it.
The Asynchronous Programming Model (APM), as implemented by Delegates, consists of three parts:
- EndInvoke and
- Rendezvous techniques.
BeginInvoke starts an algorithm, impelmented via a method, on a new thread. EndInvoke retrieves the result of that method. The Rendezvous techniques allow you to determine when the asynchronous operation has completed.
There are three different types of Rendezvous techniques you can use to retrieve the results of an asynchronous delegate invocation
1. Wait Till Completion
3. Method Callback
// a delegate for a method that takes no params and returns a string.