Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultLimit = 100
DefaultLimit is the default Conccurrent limit
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Limiter ¶
type Limiter struct {
// contains filtered or unexported fields
}
Limiter object
func NewLimiter ¶
NewConccurLimiter allocates a new ConccurLimiter
type WorkerPool ¶
type WorkerPool struct {
// contains filtered or unexported fields
}
func NewWorkerPool ¶
func NewWorkerPool(limit uint64) *WorkerPool
func (*WorkerPool) Add ¶
func (p *WorkerPool) Add(numTasks uint64) uint64
func (*WorkerPool) Done ¶
func (p *WorkerPool) Done()
func (*WorkerPool) Execute ¶
func (p *WorkerPool) Execute(f func())
func (*WorkerPool) Running ¶
func (p *WorkerPool) Running() uint64
func (*WorkerPool) Wait ¶
func (p *WorkerPool) Wait()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.