-
Notifications
You must be signed in to change notification settings - Fork 1
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
TraversalExtensions sample notebook #192
Conversation
public async Task IsEqualToOne(int x) | ||
{ | ||
bool result = x.Equals(1); | ||
Console.WriteLine(result); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you wrote this in Visual Studio, it would issue a warning because although you've declared this as async
you don't seem to have used await
, so this isn't really async
.
I'd consider adding something like
await Task.Delay(TimeSpan.FromSeconds(0.5));
so that a) it is async, and b) it becomes reasonable clear that ForEachAsync
waits for the Task
returned for each item to complete before moving onto the next.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using await
in all async
methods now
No description provided.