schedgroup

package
v0.0.0-...-04966db Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	// contains filtered or unexported fields
}

A Group is a goroutine worker pool which delays tasks for a specified time.

func New

func New(ctx context.Context) *Group

New creates a new Group which will use ctx for cancelation.

func (*Group) Delay

func (g *Group) Delay(delay time.Duration, fn func())

Delay schedules a function to run at or after the specified delay.

func (*Group) Wait

func (g *Group) Wait() error

Wait waits for the completion of all scheduled tasks.

Jump to

Keyboard shortcuts

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