http://msdn.microsoft.com/en-us/library/dd537607.aspx using System; using System.Collections.Concurrent; using System.Threading; using System.Threading.Tasks; public class Example { public static void Main() { var tokenSource = new CancellationTokenS…
We use both Thread.Sleep() and Task.Delay() to suspend the execution of a program for some given time. But are we actually suspending the execution? What is the difference between these two? How to abort from a Sleeping thread or from a delaying task…
http://beyondrelational.com/modules/2/blogs/79/posts/11524/task-cancellation-parallel-programming-iii.aspx This is my third article on Parallel programming. Last two articles are on Data Parallelism and Task Parallelism. You can read my previous arti…