-
Notifications
You must be signed in to change notification settings - Fork 344
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
[imporve] add func blockIfQueueFull() to encapsulate DisableBlockIfQue… #1122
Conversation
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.
I like this change to avoid double negation readability issue.
What about we use -
if p.blockIfQueueFull() {
// ..
} else {
// ..
}
and switch if-else blocks, so avoid just move the double negation into if block
@tisonkun OK, I will update it right now |
DATA RACE - while it should be unrelated to this PR
|
Fixes #1088
Master Issue: #1088
Motivation
Since
DisableBlockIfQueueFull
is difficult to understand and renaming it is not acceptable, we can add a func to encapsulate it and make it easy to understand and use.Modifications
blockIfQueueFull()
blockIfQueueFull()
when neccessaryVerifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation