Reputation: 2974
i didnt use TPL that much in .net 4 but i know its great for multi-core Applications
but in PDC i saw them announcing Async CTP & i only saw Async in F#
my Question is what is the difference between them & what are the best practices for each of them
thanks in advance
Upvotes: 6
Views: 2951
Reputation: 1503290
The async features in C# 5 will use the TPL... which is just a library, of course. Asynchronous methods will simply make it a lot easier to use the TPL... given appropriate relatively-low-level async operations (e.g. "fetch a web page asynchronously" or "read a block of data asynchronously" it will be fairly easy to build higher-level asynchronous operations.
In terms of best practices - for TAP (Task-based Asynchronous Pattern) there's an interesting white paper. For parallel programming in general with .NET, there's a book by the Patterns and Practices group, "Parallel Programming with Microsoft .NET" and also Joe Duffy's book "Concurrent Programming on Windows" - although the latter predates the TPL slightly.
Upvotes: 11