runner

package
v0.26.19 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: AGPL-3.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SingleRunner

type SingleRunner struct {
	// contains filtered or unexported fields
}

SingleRunner is a support struct for implementing module.ReadyDoneAware

func NewSingleRunner

func NewSingleRunner() SingleRunner

func (*SingleRunner) Abort

func (s *SingleRunner) Abort() <-chan struct{}

Abort() will abort the SingleRunner. Note that the channel returned from Start() will never be closed if the SingleRunner is aborted before Start() is called. This mimics the real world case:

  • consider a runner at a starting position of a race waiting for the start signal
  • if the runner to told to abort the race _before_ the start signal occurred, the runner will never start

func (*SingleRunner) ShutdownSignal

func (u *SingleRunner) ShutdownSignal() <-chan struct{}

ShutdownSignal returns a channel that is closed when the shutdown signal has been given

func (*SingleRunner) Start

func (s *SingleRunner) Start(f func()) <-chan struct{}

Jump to

Keyboard shortcuts

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