Help us shape the future of Go! Take the 2026 Go Developer Survey

wait

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package wait provides small concurrency helpers shared across subsystems.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SleepOrStop

func SleepOrStop(stop <-chan struct{}, d time.Duration) bool

SleepOrStop waits for d to elapse or until stop is closed, whichever happens first. It returns true if the full duration elapsed, or false if stop fired (i.e. a stop/shutdown was requested) before then. The timer is always released, so it is safe to call in a tight reconnect loop.

Types

This section is empty.

Jump to

Keyboard shortcuts

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