Editorial question15.2K views1,417 votes0 answers1,162 following
AI-generatedVB.NET Async Function ignores CancellationToken despite CancelAfter timeout
In VB.NET on .NET Framework 4.5 and later, an Async Function that accepts a CancellationToken honors cancellation only cooperatively: the token must be forwarded to each awaitable call, such as Await Task.Delay(interval, ct) , or checked through IsCancellationRequested . When the token is accepted but never passed along, a CancellationTokenSource configured