goroutines

package
v1.80.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: BSD-3-Clause Imports: 7 Imported by: 4

Documentation

Overview

The goroutines package contains utilities for tracking and getting active goroutines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScrubbedGoroutineDump

func ScrubbedGoroutineDump(all bool) []byte

ScrubbedGoroutineDump returns either the current goroutine's stack or all goroutines' stacks, but with the actual values of arguments scrubbed out, lest it contain some private key material.

Types

type Tracker added in v1.80.0

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

Tracker tracks a set of goroutines.

func (*Tracker) AddDoneCallback added in v1.80.0

func (t *Tracker) AddDoneCallback(f func()) (remove func())

AddDoneCallback adds a callback to be called in a new goroutine whenever a goroutine managed by t (excluding ones from this method) finishes. It returns a function to remove the callback.

func (*Tracker) Go added in v1.80.0

func (t *Tracker) Go(f func())

func (*Tracker) RunningGoroutines added in v1.80.0

func (t *Tracker) RunningGoroutines() int64

func (*Tracker) StartedGoroutines added in v1.80.0

func (t *Tracker) StartedGoroutines() int64

Jump to

Keyboard shortcuts

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