lgroup

package
v0.1.44 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LGroup

type LGroup[Init any] interface {
	Join(context.Context, Init) bool
	Register(func(context.Context, Init) error)
	Done() <-chan struct{}
}

func NewLGroup

func NewLGroup[Init any](cancel context.CancelCauseFunc) (group LGroup[Init], start func())

NewLGroup creates a new LGroup which manages the lifecycles of contexts and helper functions over them. It calls the passed cancel function when complete. The caller must eventually call start(); to do otherwise leaks. The start() method allows setup/join before kickoff, that way the LGroup doesn't start dead.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL