Skip to content

svc: support closing via context#13

Merged
judwhite merged 2 commits into
judwhite:masterfrom
jehiah:ctx_done_13
Dec 1, 2020
Merged

svc: support closing via context#13
judwhite merged 2 commits into
judwhite:masterfrom
jehiah:ctx_done_13

Conversation

@jehiah

@jehiah jehiah commented Nov 25, 2020

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Owner

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

@judwhite

judwhite commented Dec 1, 2020

Copy link
Copy Markdown
Owner

LGTM

@judwhite
judwhite merged commit 979863f into judwhite:master Dec 1, 2020
@jehiah

jehiah commented Dec 1, 2020

Copy link
Copy Markdown
Contributor Author

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