runtime

package
v1.26.2-125.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertNoGoRoutineWithFn added in v1.25.0

func AssertNoGoRoutineWithFn(t testing.TB, fn any)

func PrintGoRoutines

func PrintGoRoutines()

PrintGoRoutines prints all go routines.

func WaitGoRoutineWithFn

func WaitGoRoutineWithFn(t testing.TB, fn any, opts ...func(*WaitOptions)) int

WaitGoRoutineWithFn waits for a go routine with the given function to appear in call stacks, using different WaitOptions, and returns the number of attempts needed to find the go routine.

func WithCheckInterval added in v1.25.0

func WithCheckInterval(checkInterval time.Duration) func(*WaitOptions)

func WithMaxDuration added in v1.25.0

func WithMaxDuration(maxDuration time.Duration) func(*WaitOptions)

func WithNumGoRoutines added in v1.25.0

func WithNumGoRoutines(numGoRoutines int) func(*WaitOptions)

Types

type WaitOptions added in v1.25.0

type WaitOptions struct {
	CheckInterval time.Duration
	MaxDuration   time.Duration
	NumGoRoutines int
}

Jump to

Keyboard shortcuts

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