given CancellationTokenSource is disposable. is it a problem to not have it being disposed?
public static class TimeSpanExtensions
{
public static CancellationToken ToCancellationToken(this TimeSpan timeout)
{
var cts = new CancellationTokenSource(timeout);
return cts.Token;
}
}
given CancellationTokenSource is disposable. is it a problem to not have it being disposed?
https://learn.microsoft.com/en-us/dotnet/standard/threading/cancellation-in-managed-threads