oxidecomputer / oxidecomputer/dropshot
Should `close()` wait for the server to shutdown?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 104
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 22
Description
Lifting this from a PR comment so it isn't lost now that the PR is merged without addressing this:
@smklein
After https://github.com/oxidecomputer/dropshot/pull/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:
- Deprecate
close()and add two new methods:close_and_wait()+close_nowait(). - 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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the close() API and the behavior changes discussed in PRs 537 and 543. Determine whether close() should wait, and define a backwards-compatible API such as close_and_wait() or close_nowait(); done requires an agreed behavior and interface.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100