Pacote: golang-github-joshuarubin-lifecycle-dev (1.1.4-2)
Links para golang-github-joshuarubin-lifecycle-dev
Recursos de Debian:
- Relatórios de bug
- Informação de desenvolvedor(a)
- Debian Changelog
- Arquivo de copyright
- Rastreador de patch Debian
Baixe o pacote-fonte golang-github-joshuarubin-lifecycle:
- [golang-github-joshuarubin-lifecycle_1.1.4-2.dsc]
- [golang-github-joshuarubin-lifecycle_1.1.4.orig.tar.gz]
- [golang-github-joshuarubin-lifecycle_1.1.4-2.debian.tar.xz]
Mantenedores(as):
Fontes externas:
- Pagina principal [github.com]
Pacotes similares:
- golang-github-michaeltjones-walk-dev
- libhttp-async-perl
- golang-github-nozzle-throttler-dev
- golang-github-fatih-semgroup-dev
- golang-github-nebulouslabs-threadgroup-dev
- pushover
- domino-chain
- golang-golang-x-sync-dev
- golang-github-knetic-govaluate-dev
- golang-github-casbin-govaluate-dev
- tryton-modules-marketing-automation
manage goroutines in golang applications (library)
lifecycle helps manage goroutines at the application level. context.Context has been great for propagating cancellation signals, but not for getting any feedback about when goroutines actually finish. This package works with context.Context to ensure that applications don't quit before their goroutines do.
The semantics work similarly to the go (lifecycle.Go) and defer (lifecycle.Defer) keywords as well as sync.WaitGroup.Wait (lifecycle.Wait). Additionally, there are lifecycle.GoErr and lifecycle.DeferErr which only differ in that they take funcs that return errors.
lifecycle.Wait will block until one of the following happens:
- all funcs registered with Go complete successfully then all funcs registered with Defer complete successfully - a func registered with Go returns an error, immediately canceling ctx and triggering Defer funcs to run. Once all Go and Defer funcs complete, Wait will return the error - a signal (by default SIGINT and SIGTERM, but configurable with WithSignals) is received, immediately canceling ctx and triggering Defer funcs to run. Once all Go and Defer funcs complete, Wait will return ErrSignal - a func registered with Go or Defer panics. the panic will be propagated to the goroutine that Wait runs in. there is no attempt, in case of a panic, to manage the state within the lifecycle package.
Outros pacotes relacionados a golang-github-joshuarubin-lifecycle-dev
|
|
|
|
-
- dep: golang-golang-x-sync-dev
- Supplemental Go synchronization libraries
Download de golang-github-joshuarubin-lifecycle-dev
Arquitetura | Tamanho do pacote | Tamanho instalado | Arquivos |
---|---|---|---|
all | 7.9 kB | 36.0 kB | [lista de arquivos] |