Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimedWaitGroup ¶
type TimedWaitGroup struct {
// contains filtered or unexported fields
}
TimedWaitGroup represents a WaitGroup
func NewTimedWaitGroup ¶
func NewTimedWaitGroup(target int, timeout time.Duration) *TimedWaitGroup
NewTimedWaitGroup constructs a new timed wait group and starts the timeout counter. Target and timeout arguments must both be bigger 0
func (*TimedWaitGroup) CurrentProgress ¶
func (p *TimedWaitGroup) CurrentProgress() int
CurrentProgress returns the current progress
func (*TimedWaitGroup) IsCompleted ¶
func (p *TimedWaitGroup) IsCompleted() bool
IsCompleted returns true if the wait group already completed, otherwise returns false
func (*TimedWaitGroup) Progress ¶
func (p *TimedWaitGroup) Progress(delta int) int
Progress progresses the wait group by the given delta. Returns the current progress after the update
func (*TimedWaitGroup) Wait ¶
func (p *TimedWaitGroup) Wait() error
Wait blocks until the wait group is either completed or timed out. Returns an error if the wait group timed out
Click to show internal directories.
Click to hide internal directories.