Parallelism in Visual Studio 2010: Demos Updated to Beta 2
As you probably know, Visual Studio 2010 has reached the Beta 2 milestone, with a go-live license available to start coding your production applications using this release.
There have been some minor changes around the System.Threading.Tasks namespace and classes, with the most significant change being around the cancellation model for tasks. Instead of explicitly reaching out for a Task object and then calling its Cancel method (which has been removed, along with the static Task.Current property), cancellation now requires a CancellationTokenSource object to be created, its Token property should be passed to the methods that create a task, and then its Cancel method can be used to cancel the task hierarchy using that cancellation token.
There’s more information about these changes on the Parallel FX team blog.
A few weeks ago I posted slides and code for parallelism demos in Visual Studio 2010. I now updated these demos to work on Beta 2, and you can download them as usual. (The only changes have been around the new cancellation model and the removal of the ConcurrentLinkedList<T> collection.)