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

Should close() wait for the server to shutdown? #546

Open
jgallagher opened this issue Jan 6, 2023 · 0 comments
Open

Should close() wait for the server to shutdown? #546

jgallagher opened this issue Jan 6, 2023 · 0 comments

Comments

@jgallagher
Copy link
Contributor

Lifting this from a PR comment so it isn't lost now that the PR is merged without addressing this:

@smklein
After #537, I wonder if we should no longer make close wait for the server to terminate.

We could add a convenience close_and_wait for anyone that wants backwards compatibility?

@jgallagher
Changing the behavior of close() seems a little dicey from a backwards compatibility standpoint, but I do see your point. A couple other ideas, although I'm not sure I like these all that much more:

  1. Deprecate close() and add two new methods: close_and_wait() + close_nowait().
  2. Change close() to take an argument specifying whether or not to wait: close(CloseBehavior::Wait) or somesuch. This would be backwards incompatible in a way that old clients would have to update instead of silently getting different behavior.
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

No branches or pull requests

1 participant