File: control

package info (click to toggle)
golang-github-joshuarubin-lifecycle 1.1.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 108 kB
  • sloc: makefile: 2
file content (50 lines) | stat: -rw-r--r-- 2,272 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Source: golang-github-joshuarubin-lifecycle
Section: golang
Priority: optional
Maintainer: Debian Go Packaging Team <team+pkg-go@tracker.debian.org>
Uploaders: Maytham Alsudany <maytha8thedev@gmail.com>
Rules-Requires-Root: no
Build-Depends:
 debhelper-compat (= 13),
 dh-golang,
 golang-any,
 golang-golang-x-sync-dev,
Testsuite: autopkgtest-pkg-go
Standards-Version: 4.6.2
Vcs-Browser: https://salsa.debian.org/go-team/packages/golang-github-joshuarubin-lifecycle
Vcs-Git: https://salsa.debian.org/go-team/packages/golang-github-joshuarubin-lifecycle.git
Homepage: https://github.com/joshuarubin/lifecycle
XS-Go-Import-Path: github.com/joshuarubin/lifecycle


Package: golang-github-joshuarubin-lifecycle-dev
Architecture: all
Multi-Arch: foreign
Depends:
 golang-golang-x-sync-dev,
 ${misc:Depends},
Description: 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.