spinlock

package
v1.17.6-rc4 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: BSD-3-Clause Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTimedOut = errors.New("timed out waiting for condition")

Functions

func Wait

func Wait(timeoutDur time.Duration, cond func() bool) error

Wait blocks execution until condition is satisfied or until it times out.

func WaitWithInterval

func WaitWithInterval(timeoutDur, checkIntervalDur time.Duration, cond func() bool) error

WaitWithInterval blocks execution until condition is satisfied or until it times out. Condition is checked on specified checkIntervalDur.

Types

This section is empty.

Jump to

Keyboard shortcuts

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