Friday 22 November 2013

Asynchronous Programming in a Pre and Post Dot Net 4 World

Dot net 4 recommends using Tasks over Threads. But what vestiges of the pre-dot net four programming universe retain their relevance in the "dot-net four and above" programming world? For that we must turn to the interfaces of System.Threading.

IAsyncResult emerged as early as Dot net 1.1 in Visual Basic, C# and Managed C++, literally as the "return type of methods that implement an asynchronous operation". An IAsyncResult has a property AsyncState that contains information about the asynchronous operation. The boolean IsCompleted indicates whether the operation has completed.

No comments: