signal

package
v2.43.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2017 License: MIT Imports: 2 Imported by: 7

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 struct {
	// contains filtered or unexported fields
}

func CancelAfterInactivity

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

func (*ActivityTimer) SetTimeout

func (t *ActivityTimer) SetTimeout(timeout time.Duration)

func (*ActivityTimer) Update

func (t *ActivityTimer) Update()

type ActivityUpdater

type ActivityUpdater interface {
	Update()
}

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