Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 8.2% on proxy.golang.org

proxy.golang.org : github.com/hemantjadon/runner

Package runner provides an idiomatic wrapper for managing long running tasks with requirement of single atomic runs and graceful atomic shutdowns. Runner can be made by wrapping any runnable into the Runner type. A runnable can be any type satisfying the interface. The runnable must respect the ctx and should terminate when ctx completes. Run() starts the runnable job with a ctx provided, whereas Close() cancels the ctx thereby shutting down the job. Run() and Close() can be called concurrently, but the actual run and close of the job will be atomic (the main goal of the package). If called concurrently, only one of the calls to Run() and Close() will actually have impact, rest all the other calls will exit with ErrRunning and ErrStopping respectively.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/hemantjadon/runner
Keywords: application, atomic, golang, graceful-shutdown, long-running
License: MIT
Latest release: about 4 years ago
First release: about 4 years ago
Namespace: github.com/hemantjadon
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 23 days ago

    Loading...
    Readme
    Loading...