Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WaitGroup ¶
type WaitGroup struct { Size int //maximun number of concurrently goroutines // contains filtered or unexported fields }
WaitGroup has the same role and close to the same API as the Golang sync.WaitGroup but adds a limit of the amount of goroutines started concurrently.
func New ¶
New creates a WaitGroup. The limit parameter is the maximum amount of goroutines which can be started concurrently.
func (*WaitGroup) Add ¶
func (s *WaitGroup) Add()
Add increments the internal WaitGroup counter. It can be blocking if the limit of spawned goroutines has been reached.
Click to show internal directories.
Click to hide internal directories.