Documentation ¶
Overview ¶
Package sync contains wrappers around golang's sync wrappers Inspired from https://groups.google.com/forum/#!msg/golang-nuts/QCQkT_sihWY/jMW_pZmmAAAJ
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CountWG ¶
type CountWG struct {
// contains filtered or unexported fields
}
CountWG is a counted WaitGroup useful to get the number of items on which we're still waiting for it internally uses sync.WaitGroup and also an int64 counter which is incremented / decremented using sync/atomic package so they're safe for concurrent access
func (*CountWG) Add ¶
Add adds delta, which may be negative to the CountWG counter. If the counter becomes zero, all goroutines blocked on Wait are released. If the counter goes negative, Add panics.
Click to show internal directories.
Click to hide internal directories.