Back to godoc.org

Package internal

v0.0.0-...-352556d
Latest Go to latest

The latest major version is .

Published: Jul 21, 2020 | License: BSD-3-Clause | Module: golang.org/x/playground

Index

func PeriodicallyDo

func PeriodicallyDo(ctx context.Context, period time.Duration, f func(context.Context, time.Time))

PeriodicallyDo calls f every period until the provided context is cancelled.

func WaitOrStop

func WaitOrStop(ctx context.Context, cmd *exec.Cmd, interrupt os.Signal, killDelay time.Duration) error

WaitOrStop waits for the already-started command cmd by calling its Wait method.

If cmd does not return before ctx is done, WaitOrStop sends it the given interrupt signal. If killDelay is positive, WaitOrStop waits that additional period for Wait to return before sending os.Kill.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier