Skip to content

Instantly share code, notes, and snippets.

@miteshsureja
miteshsureja / Program.cs
Created March 8, 2017 13:53
How to cancel a Parallel.For and Parallel.Foreach loop – Task Parallel Library
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System;
using System.Threading.Tasks;
using System.Threading;
namespace ParallelFor
{