Showing results for Cancellation - .NET Blog

Jan 13, 2013
Post comments count0
Post likes count2

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...

.NET Parallel Programming
Dec 3, 2011
Post comments count0
Post likes count0

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...

.NET Parallel Programming
Nov 4, 2010
Post comments count0
Post likes count0

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 ...

.NET Parallel Programming
Jul 2, 2010
Post comments count0
Post likes count0

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...

.NET Parallel Programming
Oct 19, 2009
Post comments count0
Post likes count0

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...

.NET Parallel Programming
Jun 22, 2009
Post comments count0
Post likes count0

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...

.NET Parallel Programming
May 22, 2009
Post comments count0
Post likes count0

.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...

.NET Parallel Programming