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

Code Review - Behaviors of FixedRate and FixedDelay should be similar in TasksRunnerService #5147

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

zcxsythenew
Copy link
Contributor

In TasksRunnerService, the behaviors of FixedRate and FixedDelay are quite different.

In method scheduleWithFixedDelay, we (1) execute Runnable, and then (2) check whether the task request id still exists, and finally (3) schedule next execution.

However, in method scheduleAtFixedRate, we (1) execute Runnable, and then (2) schedule next execution, without checking the task request id.

I believe that FixedDelay and FixedRate are similar and should not have such difference, so I raise this pull request to add a check in method scheduleAtFixedRate.

This pull request also addresses issue #5143 .

…in TasksRunnerService

Signed-off-by: Guozhang Wu <wguozhang@vmware.com>
Copy link
Member

@mrniko mrniko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for suggested changes. Please add a test

…in TasksRunnerService

Signed-off-by: Guozhang Wu <wguozhang@vmware.com>
@zcxsythenew zcxsythenew requested a review from mrniko July 4, 2023 06:39
Guozhang Wu and others added 2 commits July 4, 2023 14:41
@zcxsythenew
Copy link
Contributor Author

Thank you for suggested changes. Please add a test

Done

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

Successfully merging this pull request may close these issues.

None yet

2 participants