signal

package
v2.24.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorOrFinish1

func ErrorOrFinish1(ctx context.Context, c <-chan error) error

func ErrorOrFinish2

func ErrorOrFinish2(ctx context.Context, c1, c2 <-chan error) error

func ExecuteAsync

func ExecuteAsync(f func() error) <-chan error

ExecuteAsync executes a function asychrously and return its result.

Types

type ActivityTimer

type ActivityTimer interface {
	Update()
}

func BackgroundTimer

func BackgroundTimer() ActivityTimer

func CancelAfterInactivity

func CancelAfterInactivity(ctx context.Context, timeout time.Duration) (context.Context, ActivityTimer)

type Semaphore

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

func NewSemaphore

func NewSemaphore(n int) *Semaphore

func (*Semaphore) Signal

func (s *Semaphore) Signal()

func (*Semaphore) Wait

func (s *Semaphore) Wait() <-chan bool

Jump to

Keyboard shortcuts

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