Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimeoutWaitGroup ¶
type TimeoutWaitGroup struct {
// contains filtered or unexported fields
}
TimeoutWaitGroup works just like a normal wait-group, but Wait will exit and return true if all tasks have not declared Done() before the timeout expires. It's most useful in tests, but can also be useful for waiters which want to periodically report progress (number of remaining workers).
func (*TimeoutWaitGroup) Add ¶
func (twg *TimeoutWaitGroup) Add(delta int)
Add increments the wait group's count of active workers by delta.
func (*TimeoutWaitGroup) Done ¶
func (twg *TimeoutWaitGroup) Done()
Done decrements the wait group count by one.
Click to show internal directories.
Click to hide internal directories.