title: How to abort specific thread in task parallel library with C#
body: <p>I have this tricky task I've been trying to achieve for quiet sometime but till now I couldn't think of anything to make it work. anyway here is the scenario...</p>
  
  <p>I have a winform application contains a listview and a button.
  the listview contains 1 column which holds the data I need to pass to my functions later on. the column contains lets say 50 rows containing a list of links.</p>
  
  <p>Now I have this function which I'm using to fetch and grab the contents of these links (5 links at a time) with parallel multithreaded mode using (Task Parallel Library):</p>
  
  <pre><code>//List&lt;int&gt; currentWorkingItem //contains the indices of the items in listview
  //List&lt;string&gt; URLsList //contains the URLs of the items in listview
  
  Parallel.ForEach(URLsList, new ParallelOptions() { MaxDegreeOfParallelism = 5 }, (url, i, j) =&gt;
  {
      //show to user this link is currently being downloaded by highlighting the item to green...
      this.BeginInvoke((Action)(delegate()
      {
          //current working item 
          mylistview.Items[currentWorkingItem[(int)j]].BackColor = green;
  
      }));
  
      //here I download the contents of every link in the list...
      string HtmlResponse = GetPageResponse(url);
  
      //do further processing....
  });
  </code></pre>
  
  <p>Now the above code works perfectly... but sometimes I want the user to abort certain thread which is currently running and continue with the rest of the threads in the list... is that achievable in this? if so please help me out.. I'd really appreciate any solution or suggestions..</p>