https://github.com/bobvawter/go-stopper
A utility for gracefully terminating long-running tasks within a Go program
https://github.com/bobvawter/go-stopper
apache2-license go golang
Last synced: 3 months ago
JSON representation
A utility for gracefully terminating long-running tasks within a Go program
- Host: GitHub
- URL: https://github.com/bobvawter/go-stopper
- Owner: bobvawter
- License: apache-2.0
- Created: 2025-01-08T15:46:35.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-01-08T16:34:10.000Z (5 months ago)
- Last Synced: 2025-01-08T17:02:35.608Z (5 months ago)
- Topics: apache2-license, go, golang
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Golang Task Lifecycle Management
[](https://pkg.go.dev/vawter.tech/stopper)
```shell
go get vawter.tech/stopper
```This package contains a utility for gracefully terminating long-running tasks within a Go program.
A `stopper.Context` extends the stdlib `context.Context` API with a soft-stop signal and includes
task-launching APIs similar to `sync.WaitGroup` or `sync.ErrGroup`. This API supports nested contexts
for use-cases where tasks may be hierarchical in nature.## Project History
This repository was extracted from `github.com/cockroachdb/field-eng-powertools` using the command
`git filter-repo --subdirectory-filter stopper --path LICENSE` by the code's original author.