Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Are You Using Cancellation Token The Right Way? 5 Recommended Patterns | Exploring C# and DOTNET

  • Rahul Nath
  • 2024-03-26
  • 3641
Are You Using Cancellation Token The Right Way? 5 Recommended Patterns | Exploring C# and DOTNET
  • ok logo

Скачать Are You Using Cancellation Token The Right Way? 5 Recommended Patterns | Exploring C# and DOTNET бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Are You Using Cancellation Token The Right Way? 5 Recommended Patterns | Exploring C# and DOTNET или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Are You Using Cancellation Token The Right Way? 5 Recommended Patterns | Exploring C# and DOTNET бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Are You Using Cancellation Token The Right Way? 5 Recommended Patterns | Exploring C# and DOTNET

CancellationTokens in .NET allows the caller to express lost interest in the result of an operation. This can be at a Function level, class level, API endpoint, etc.

But does that mean all requests are the same and can be canceled similarly? Short answer - No!

So, let’s learn some recommended practices when using Cancellation Tokens in your application code. Here are five recommended patterns to use as a guide when working with CancellationTokens in .NET

1. Avoid canceling operations after side effects to prevent inconsistencies in the application state.
2. Optional on Public API and required everywhere else (Make it an intentional choice to pass on the `CancellationToken`)
3. Use `CancellationToken.None` after the point of 'no cancellation' (has incurred side effects)
4. Check `CancellationToken.CanBeCancelld` if your functions can be more efficient when the tokens can't be canceled. (`Task.Delay` is a good example of this.)
5. Ignore `CancellationToken` if work is very quick.

00:00 Introduction
01:15 Should all Functions be Cancellable?
05:02 1. Avoid Cancelling After Side-effects
06:40 2. Mandate CancellationToken in Functions
08:09 3. CalcellationToken.None
10:01 4. CancellationToken.CanBeCancelled
11:35 5. Ignore CancellationToken

Thank you to AWS for sponsoring this video.

🔗 Cancellation Token - https://www.rahulpnath.com/blog/cance...
🔗 Code - https://github.com/rahulpnath/youtube...

Additional Watching
📹Cancellation Token -    • Cancellation Token in .NET | Exploring C# ...  
📹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 -   / rahulpnath  
📸Instagram -   / rahulpnath  

#dotnet #csharp

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]