Skip to content
New issue

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

Bug in ActionScheduler.Start(TimeSpan, Func<Task>) #85

Open
Paccc opened this issue Sep 19, 2017 · 0 comments
Open

Bug in ActionScheduler.Start(TimeSpan, Func<Task>) #85

Paccc opened this issue Sep 19, 2017 · 0 comments

Comments

@Paccc
Copy link

Paccc commented Sep 19, 2017

There is a bug in ActionScheduler.cs line 50:

Start(interval, t => t.IsCancellationRequested ? action() : TaskEx.CompletedTask);

The clauses of the if statement are reversed causing it to return a completed task if cancellation is not requested. The correct statement should be to negate the if condition:

Start(interval, t => !t.IsCancellationRequested ? action() : TaskEx.CompletedTask);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant