Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoundedWaitGroup ¶
type BoundedWaitGroup struct {
// contains filtered or unexported fields
}
BoundedWaitGroup like a normal wait group except limits number of active goroutines to given capacity.
func New ¶
func New(cap uint) BoundedWaitGroup
New creates a BoundedWaitGroup with the given concurrency.
func (*BoundedWaitGroup) Add ¶
func (bwg *BoundedWaitGroup) Add(delta int)
Add the number of items to the group. Blocks until there is capacity.
func (*BoundedWaitGroup) Done ¶
func (bwg *BoundedWaitGroup) Done()
Done removes one from the wait group.
func (*BoundedWaitGroup) Wait ¶
func (bwg *BoundedWaitGroup) Wait()
Wait for the wait group to finish.
Click to show internal directories.
Click to hide internal directories.