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

server: update context plumbing #66

Merged
merged 3 commits into from
Dec 7, 2021
Merged

server: update context plumbing #66

merged 3 commits into from
Dec 7, 2021

Conversation

creachadair
Copy link
Owner

Update the Accepter interface to take a context argument.
This is a breaking change to the interface, but NetAccepter works
without change, so most existing use is not affected.

Rework Loop as LoopContext, which takes a context argument to
govern the lifecycle of the loop itself. Retain Loop as a wrapper
for LoopContext with a background context.

Update and clean up tests.

Update the Accept method to accept a context. This is a breaking change to the
interface, but users of server.NetContext (which is most existing use) are not
affected.

Rework Loop as LoopContext, which now accepts a context that governs the loop.
Retain Loop as a wrapper to call LoopContext with a background context, so
existing use will work without change.
@creachadair creachadair self-assigned this Dec 7, 2021
@creachadair creachadair added the enhancement New feature or request label Dec 7, 2021
@creachadair creachadair merged commit 9060442 into default Dec 7, 2021
@creachadair creachadair deleted the mjf/server-context branch December 7, 2021 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant