<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>CancellationToken on Daniel Genezini</title><link>https://genezini.com/tags/cancellationtoken/</link><description>Recent content in CancellationToken on Daniel Genezini</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>2022 Daniel Genezini All rights reserved</copyright><lastBuildDate>Tue, 20 Dec 2022 06:45:00 -0300</lastBuildDate><atom:link href="https://genezini.com/tags/cancellationtoken/index.xml" rel="self" type="application/rss+xml"/><item><title>Time-out requests in ASP.NET Core with cancellation tokens</title><link>https://genezini.com/blog/p/time-out-requests-in-asp.net-core-with-cancellation-tokens/</link><pubDate>Tue, 20 Dec 2022 06:45:00 -0300</pubDate><guid>https://genezini.com/blog/p/time-out-requests-in-asp.net-core-with-cancellation-tokens/</guid><description>&lt;img src="https://genezini.com/blog/p/time-out-requests-in-asp.net-core-with-cancellation-tokens/cover.jpg" alt="Featured image of post Time-out requests in ASP.NET Core with cancellation tokens" /> When ASP.NET Core is running in an AWS Lambda and receiving requests through an AWS API Gateway, the application is not notified of an API Gateway time-out and keeps processing the request, completing it eventually. This will leave metrics and logs of a successful request when the client received a time-out error.
In this post, I'll show how to solve this problem with cancellation tokens and time-outs.</description></item><item><title>Canceling abandoned requests in ASP.NET Core</title><link>https://genezini.com/blog/p/canceling-abandoned-requests-in-asp.net-core/</link><pubDate>Mon, 12 Dec 2022 07:30:00 -0300</pubDate><guid>https://genezini.com/blog/p/canceling-abandoned-requests-in-asp.net-core/</guid><description>&lt;img src="https://genezini.com/blog/p/canceling-abandoned-requests-in-asp.net-core/cover.jpg" alt="Featured image of post Canceling abandoned requests in ASP.NET Core" /> When a client makes an HTTP request, the client can abort the request, leaving the server processing if it's not prepared to handle this scenario; wasting its resources that could be used to process other jobs.
In this post, I'll show how to use Cancellation Tokens to cancel running requests that were aborted by clients.</description></item></channel></rss>