package goroutines
import "tailscale.com/util/goroutines"
The goroutines package contains utilities for tracking and getting active goroutines.
Index ¶
Functions ¶
func ScrubbedGoroutineDump ¶
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 ¶
type Tracker struct {
// contains filtered or unexported fields
}
Tracker tracks a set of goroutines.
func (*Tracker) AddDoneCallback ¶
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 ¶
func (t *Tracker) Go(f func())
func (*Tracker) RunningGoroutines ¶
func (*Tracker) StartedGoroutines ¶
Source Files ¶
goroutines.go tracker.go
- Version
- v1.84.0 (latest)
- Published
- May 21, 2025
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 1 day ago –
Tools for package owners.