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

svc: support closing via context #13

Merged
merged 2 commits into from
Dec 1, 2020
Merged

Conversation

jehiah
Copy link
Contributor

@jehiah jehiah commented Nov 25, 2020

In nsqio/nsq#1305 I encountered a situation where I wanted to add additional hooks for exiting a process - but the only exit path for Run() is a SIGINT/SIGTERM. In order to add new way for applications to signal that the process should exit I am adding a conditional Context interface that applications can implement. When implemented svc will wait for a SIGINT/SIGTERM OR for the context to finish.

@judwhite
Copy link
Owner

@jehiah Thanks. I'll check and merge over the weekend

@judwhite
Copy link
Owner

judwhite commented Dec 1, 2020

LGTM

@judwhite judwhite merged commit 979863f into judwhite:master Dec 1, 2020
@jehiah
Copy link
Contributor Author

jehiah commented Dec 1, 2020

Thanks @judwhite

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.

2 participants