Showing results for Cancellation - .NET Parallel Programming

Jan 13, 2013
0
2

Cooperatively pausing async methods

Stephen Toub - MSFT
Stephen Toub - MSFT

Recently I was writing an app that processed a bunch of files asynchronously.  As with the Windows copy file dialog, I wanted to be able to provide the user with a button that would pause the processing operation.To achieve that, I implemented a simple mechanism that would allow me to pass a “pause token” into the async method, whi...

Parallel ExtensionsTask Parallel Library.NET 4.5
Dec 3, 2011
0
0

Coalescing CancellationTokens from Timeouts

Stephen Toub - MSFT
Stephen Toub - MSFT

In the .NET Framework 4.5 Developer Preview, you’ll find that CancellationTokenSource now has timeout support built directly into its implementation.  This makes it very easy to create a token that will automatically have cancellation requested after a particular time interval, e.g. public static CancellationToken FromTimeout(int millise...

Parallel Extensions.NET 4.5Code Samples
Nov 4, 2010
0
0

New Feature? :: Delayed cancellation

Danny Shih
Danny Shih

 We’re interested in adding support for scheduling cancellation.  For example: // Create a token source that will Cancel() after a delay var cts = new CancellationTokenSource(TimeSpan.FromMilliseconds(100));// And/or schedule a Cancel() call cts.CancelAfter(TimeSpan.FromMilliseconds(100));We’ve heard from many folks that ...

Parallel Extensions.NET 4Cancellation
Jul 2, 2010
0
0

Using Cancellation Support in .NET Framework 4

Igor Ostrovsky - MSFT
Igor Ostrovsky - MSFT

The .NET Framework 4 introduces a new mechanism for cancellation of operations, based on new types CancellationToken and CancellationTokenSource. This cancellation mechanism is used across the parallel programming libraries: tasks, concurrent collections, and PLINQ queries.Using Cancellation Support in .NET Framework 4, written by Mike Li...

Parallel Extensions.NET 4Coordination Data Structures
Oct 19, 2009
0
0

What’s new in Beta 2 for the Task Parallel Library? (Part 1/3)

Danny Shih
Danny Shih

Related posts: Visual Studio 2010 and .NET 4 Beta 2 is here!  In terms of completeness and readiness for production coding, Beta 2 promises to be much better than Beta 1, and TPL is one component that delivers significant improvements over what was previously available.  To get you excited about it, this series of posts details...

Parallel ExtensionsTask Parallel Library.NET 4
Jun 22, 2009
0
0

Cancellation in Parallel Extensions

Mike Liddell
Mike Liddell

One of the great features that crosses all of Parallel Extensions types is a consistent approach to cancellation (see https://blogs.msdn.com/pfxteam/archive/2009/05/22/9635790.aspx). In this post we explore some of the ways cancellation is used in Parallel Extensions and explain the guidance we developed. The new cancellation system is a cooperativ...

Parallel ExtensionsTask Parallel Library.NET 4
May 22, 2009
0
0

.NET 4 Cancellation Framework

Mike Liddell
Mike Liddell

A very interesting addition to .NET 4 is a set of new types that specifically assist with building cancellation-aware applications and libraries. The new types enable rich scenarios for convenient and safe cancellation, and help simplify situations that used to be be difficult and error-prone and non-composable. The details of the new types are des...

Parallel Extensions.NET 4Coordination Data Structures