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

Use correct waiting methods for shutdown futures. #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brandondahler
Copy link

Description of changes:
Updates usages of orTimeout(long, TimeUnit) to get(long, TimeUnit).

orTimeout(long, TimeUnit) does not block the thread waiting for the shutdown to occur, instead it only schedules the future to throw a TimeoutException if it doesn't complete before the timeout occurs.

get(long, TimeUnit) is the appropriate way to block the current thread until either the future completes normally (successfully or exceptionally) or the timeout occurs.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@brandondahler brandondahler force-pushed the bugfix/IncorrectShutdownWaitMethods branch from d376652 to ba598aa Compare January 3, 2022 17:24
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

Successfully merging this pull request may close these issues.

1 participant