syncx

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cancelled = errors.New("cancelled")
View Source
var ExceededMaxTime = errors.New("exceeded max time")
View Source
var IdleTimeout = errors.New("idle timeout")

Functions

This section is empty.

Types

type CompletionTimer

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

func NewCompletionTimer

func NewCompletionTimer(maxIdleTime, maxTotalTime time.Duration, check func() bool) *CompletionTimer

func (*CompletionTimer) Cancel

func (t *CompletionTimer) Cancel()

func (*CompletionTimer) Notify

func (t *CompletionTimer) Notify()

func (*CompletionTimer) Reset added in v0.0.2

func (t *CompletionTimer) Reset() int32

Reset lets the completion timer do a new WaitForCompletion if the previous returned an IdleTimeout Reset returns the number of notifications received since last reset

func (*CompletionTimer) WaitForCompletion

func (t *CompletionTimer) WaitForCompletion() (err error)

type WaitGroup

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

func NewWaitGroup

func NewWaitGroup(ctx context.Context) *WaitGroup

func (*WaitGroup) Add

func (wg *WaitGroup) Add(delta int)

func (*WaitGroup) Cancel

func (wg *WaitGroup) Cancel()

func (*WaitGroup) Done

func (wg *WaitGroup) Done()

func (*WaitGroup) Wait

func (wg *WaitGroup) Wait() (err error)

Jump to

Keyboard shortcuts

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