Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JobTokens ¶
type JobTokens struct {
// contains filtered or unexported fields
}
JobTokens provides a bounded semaphore with the ability to wait until all concurrent jobs finish.
func New ¶
New creates a JobTokens object which allows up to n jobs to proceed concurrently. n must be > 0.
func (*JobTokens) Give ¶
func (jt *JobTokens) Give()
Give is how a job (goroutine) can give back its turn once done.
Click to show internal directories.
Click to hide internal directories.