Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(opts *Options)
Option represents the optional function.
func WithBlocking ¶
WithBlocking indicates whether the pool is blocking.
type Options ¶
type Options struct {
Blocking bool
}
Options contains all options which will be applied when instantiating an pool.
type Pool ¶
Pool is a single goroutine pool. it can not reuse the goroutine.
func (*Pool) GetOriginConcurrency ¶
GetOriginConcurrency return the concurrency of the pool at the init.
func (*Pool) ReleaseAndWait ¶
func (p *Pool) ReleaseAndWait()
ReleaseAndWait releases the pool and waits for all tasks to be completed.
func (*Pool) RunWithConcurrency ¶
RunWithConcurrency runs a function in the pool with concurrency.
Click to show internal directories.
Click to hide internal directories.