We may earn an affiliate commission when you visit our partners.

Cancellation

Save
May 11, 2024 3 minute read

Cancellation is a strategy for managing the flow of execution in asynchronous programming. It provides a way to cancel or abandon pending operations, typically when they are no longer needed or have become obsolete.

Understanding Cancellation

In an asynchronous environment, multiple tasks may be running concurrently, often with different execution times. Cancellation allows for graceful termination of specific tasks, preventing unnecessary computation and resource consumption.

The ability to cancel execution is particularly useful in situations where tasks may become outdated due to user input, system events, or changes in application state.

Cancellation Techniques

Cancellation can be implemented in various ways, depending on the programming language and underlying concurrency model.

Path to Cancellation

Take the first step.
We've curated two courses to help you on your path to Cancellation. Use these to develop your skills, build background knowledge, and put what you learn to practice.
Sorted from most relevant to least relevant:

Share

Help others find this page about Cancellation: by sharing it with your friends and followers:

Reading list

We've selected eight books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Cancellation.
Provides a comprehensive guide to cancellation in asynchronous programming, covering both the theory and practical applications. It is written by Stephen Toub, a Microsoft architect who has been working on cancellation for many years.
Covers asynchronous programming in C#, including cancellation. It is written by Jon Skeet, a world-renowned expert on C#.
Provides a comprehensive guide to asynchronous programming in .NET, including cancellation. It is written by Joseph Albahari, a Microsoft MVP who has been working on .NET for many years.
Provides a detailed look at the asynchronous programming model in .NET, including cancellation. It is written by Juval Löwy, a Microsoft architect who has been working on asynchronous programming for many years.
Provides a comprehensive guide to the Task Parallel Library (TPL), which set of libraries for writing asynchronous code in .NET. It covers cancellation in detail.
Provides a comprehensive guide to reactive programming with Rx, which library for writing asynchronous code in .NET. It covers cancellation in detail.
This article provides a comprehensive overview of asynchronous programming in .NET 4.5, including cancellation. It is written by Stephen Toub, a Microsoft architect who has been working on cancellation for many years.
This article provides a comprehensive overview of cancellation in asynchronous programming with C# 5.0. It is written by Stephen Toub, a Microsoft architect who has been working on cancellation for many years.
Table of Contents
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser