We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
for the following code, in struct Aff<RT, A>.Timeout, it will call env.LocalCancel to create a new CancellationTokenSource.
struct Aff<RT, A>.Timeout
env.LocalCancel
CancellationTokenSource
if task is complete before the timeout, I don't see place to dispose the lenv.CancellationTokenSource.
Maybe this is not a best practice, since Microsoft docs suggests that we should dispose a CancellationTokenSource when complete.
public static Aff<RT, Unit> Main => repeat( from _1 in Delay(TimeSpan.FromMilliseconds(10)).Timeout(TimeSpan.FromHours(1)) from _2 in Console<RT>.WriteLine($"{DateTime.Now:hh:mm:ss}") select unit); private static Aff<RT, Unit> Delay(TimeSpan delay) => Aff<RT, Unit>(async _ => { await Task.Delay(delay); return unit; });
Thanks,
The text was updated successfully, but these errors were encountered:
Fix for CancellationTokenSource not disposed #1234
886daea
#1234
Good spot! Fix is done and will be deployed this week 👍
Sorry, something went wrong.
No branches or pull requests
Hi,
for the following code, in
struct Aff<RT, A>.Timeout
, it will callenv.LocalCancel
to create a newCancellationTokenSource
.if task is complete before the timeout, I don't see place to dispose the lenv.CancellationTokenSource.
Maybe this is not a best practice, since Microsoft docs suggests that we should dispose a CancellationTokenSource when complete.
Thanks,
The text was updated successfully, but these errors were encountered: