-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Multiple improvements by CodeRush Static Analysis #5132
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -634,14 +634,14 @@ public void QueueSerialization() | |
| // Wait a while before assuming we've finished the updates, | ||
| // writing the cache out in a timely matter isn't too important | ||
| // now anyway. | ||
| await Task.Delay(10000); | ||
| await Task.Delay(10000).ConfigureAwait(false); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not clear to me that this is needed. Isn't the Task always configured as "false" be default?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems right though, so I think it's good to keep it.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @PaulHigin As far as I know, the default option is |
||
| int counter1, counter2; | ||
| do | ||
| { | ||
| // Check the counter a couple times with a delay, | ||
| // if it's stable, then proceed with writing. | ||
| counter1 = _saveCacheToDiskQueued; | ||
| await Task.Delay(3000); | ||
| await Task.Delay(3000).ConfigureAwait(false); | ||
| counter2 = _saveCacheToDiskQueued; | ||
| } while (counter1 != counter2); | ||
| Serialize(s_cacheStoreLocation); | ||
|
|
||
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.
This doesn't look right. I believe it should be.
return (drive2Object != null);
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.
Oh, thanks, I didn't notice that the refactoring can go even further