goroutines

package
v1.106.2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: BSD-3-Clause Imports: 7 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package goroutines 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