Cancellation Token in .NET | Exploring C# and DOTNET
Hey 👋 Imagine having a long-running request triggered by a user on your server. But, the user is no longer interested in the result and has navigated away from the page.
However, the server is still processing that request and utilizing resources until you come along and implement Cancellation Tokens in the application code.
.NET uses Cancellation Token for cooperative cancellation of asynchronous or long-running synchronous operations.
So let’s learn more about Cancellation Token and save some of that server compute time.
I will show you the problem of unnecessarily spending server resources on no longer required processes and how to solve them using Cancellation Tokens.
We will see an example of using Cancellation tokens in a console application, in a long-running HTTP API Endpoint, and when making external calls to API Endpoints. I will use Amazon S3 to show how you can use Cancellation Tokens to cancel from uploading large documents when they are no longer required.
Thank you to AWS for sponsoring this video.
🔗 Blog - https://www.rahulpnath.com/blog/cancellation-token-dotnet/
🔗 Code - https://github.com/rahulpnath/youtube-samples/tree/main/cancellation-token-example
00:00 Introduction
00:44 The Problem
03:22 What is Cancellation Token
04:48 Cancellation Token Demo
08:12 Passing Cancellation Tokens
10:09 Listening to Cancellation Requests
10:32 Cancellation Token In API
13:30 Cancellation Token and HTTP API Calls
13:54 AWS S3 Storage
18:05 Should you always Cancel?
Additional Watching
📹C# Series - https://bit.ly/mycsharp
📹 ASP Series - https://bit.ly/asp-net-core-series
📹Azure Series - https://bit.ly/azure-series
📹AWS Series - https://bit.ly/aws-net-series
📹RabbitMQ Series - https://bit.ly/rabbitmq-net-series
Come say hi! ✋
🎙️Uses - https://www.rahulpnath.com/uses
🌍Blog - https://www.rahulpnath.com/
✉ Subscribe to my Newsletter - https://www.rahulpnath.com/subscribe
🐦Twitter - https://twitter.com/rahulpnath
📸Instagram - https://www.instagram.com/rahulpnath/
#dotnet #csharp
Видео Cancellation Token in .NET | Exploring C# and DOTNET канала Rahul Nath
However, the server is still processing that request and utilizing resources until you come along and implement Cancellation Tokens in the application code.
.NET uses Cancellation Token for cooperative cancellation of asynchronous or long-running synchronous operations.
So let’s learn more about Cancellation Token and save some of that server compute time.
I will show you the problem of unnecessarily spending server resources on no longer required processes and how to solve them using Cancellation Tokens.
We will see an example of using Cancellation tokens in a console application, in a long-running HTTP API Endpoint, and when making external calls to API Endpoints. I will use Amazon S3 to show how you can use Cancellation Tokens to cancel from uploading large documents when they are no longer required.
Thank you to AWS for sponsoring this video.
🔗 Blog - https://www.rahulpnath.com/blog/cancellation-token-dotnet/
🔗 Code - https://github.com/rahulpnath/youtube-samples/tree/main/cancellation-token-example
00:00 Introduction
00:44 The Problem
03:22 What is Cancellation Token
04:48 Cancellation Token Demo
08:12 Passing Cancellation Tokens
10:09 Listening to Cancellation Requests
10:32 Cancellation Token In API
13:30 Cancellation Token and HTTP API Calls
13:54 AWS S3 Storage
18:05 Should you always Cancel?
Additional Watching
📹C# Series - https://bit.ly/mycsharp
📹 ASP Series - https://bit.ly/asp-net-core-series
📹Azure Series - https://bit.ly/azure-series
📹AWS Series - https://bit.ly/aws-net-series
📹RabbitMQ Series - https://bit.ly/rabbitmq-net-series
Come say hi! ✋
🎙️Uses - https://www.rahulpnath.com/uses
🌍Blog - https://www.rahulpnath.com/
✉ Subscribe to my Newsletter - https://www.rahulpnath.com/subscribe
🐦Twitter - https://twitter.com/rahulpnath
📸Instagram - https://www.instagram.com/rahulpnath/
#dotnet #csharp
Видео Cancellation Token in .NET | Exploring C# and DOTNET канала Rahul Nath
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![TYPE IN YOUR NATIVE INDIAN LANGUAGE - Setting up Indic Keyboard on Your Android Phone](https://i.ytimg.com/vi/SikrzTLzgds/default.jpg)
![Coding Mode on the BenQ Eye-care Monitor GW2785TC](https://i.ytimg.com/vi/hS7fTZRYZ0w/default.jpg)
![ASP NET CORE SINGLE PAGE APPLICATION (SPA) Build/Release Pipeline | Azure DevOps](https://i.ytimg.com/vi/SYhufaLn51w/default.jpg)
![DynamoDB QUERYING INDEX using HIGH-LEVEL API (DynamoDBContext) | .NET ON AWS | Serverless | Amazon](https://i.ytimg.com/vi/tVTMiaXTudc/default.jpg)
![MESSAGE DISPATCHING MODES RabbitMQ from DOTNET | Amazon MQ](https://i.ytimg.com/vi/HRudM2WTXHM/default.jpg)
![Cmder - Portable Console Emulator for Windows](https://i.ytimg.com/vi/fpxx8hlNTzc/default.jpg)
![SETUP AWS FREE Tier Account and .NET Development Environment | FREE FIRST MODULE of my Udemy Course](https://i.ytimg.com/vi/RYOG7W0fOK4/default.jpg)
![Are You Using Cancellation Token The Right Way? 5 Recommended Patterns | Exploring C# and DOTNET](https://i.ytimg.com/vi/sWAk4YMK2go/default.jpg)
![Constructors and Enforcing Invariants](https://i.ytimg.com/vi/-9zzIS3R56w/default.jpg)
![5 Ways To Query Amazon DynamoDB using .NET | AWS DynamoDB QUERYING | .NET ON AWS | AWS Serverless](https://i.ytimg.com/vi/iv6OKueqBd4/default.jpg)
![REFACTORING to MEDIATOR & CQS Pattern | AWS Lambda | ASP NET Core](https://i.ytimg.com/vi/XE1w52pNYr8/default.jpg)
![Text Editing - Extract Data](https://i.ytimg.com/vi/ouKm7Wkldp0/default.jpg)
![DynamoDB Update vs. Put | .NET ON AWS | AWS Serverless | Amazon](https://i.ytimg.com/vi/VXNEaYZ1EXs/default.jpg)
![HEADERS EXCHANGE in RabbitMQ | RabbitMQ from DOTNET | Amazon MQ](https://i.ytimg.com/vi/2x2nHN8V0cg/default.jpg)
![AWS PARAMETER STORE - Getting Started and Integrating with .NET Apps | .NET ON AWS](https://i.ytimg.com/vi/eRtBIAx7sJc/default.jpg)
![TRACING - Powertools for AWS Lambda | .NET ON AWS | Serverless | Amazon](https://i.ytimg.com/vi/m8JL-aYrLHw/default.jpg)
![DynamoDB Local Secondary Index LSI | .NET ON AWS | AWS Serverless | Amazon](https://i.ytimg.com/vi/tr1evCdgk3o/default.jpg)
![DynamoDB STREAMS & Lambda Triggers | .NET ON AWS | AWS Serverless | Amazon](https://i.ytimg.com/vi/4YzuN4MAFiQ/default.jpg)
![How To Apply Open Closed Principle To Event Driven Architecture | Messaging Series .NET](https://i.ytimg.com/vi/ihazm2-BwsU/default.jpg)
![DynamoDB PROJECTION EXPRESSIONS | .NET ON AWS | AWS Serverless | Amazon](https://i.ytimg.com/vi/raviybVaCdg/default.jpg)
![NServiceBus - Publish/Subscribe AWS SQS Transport Getting Started | .NET ON AWS](https://i.ytimg.com/vi/6yW9Spw9j_c/default.jpg)