Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsParallel ¶ added in v0.3.1
Types ¶
type Scheduler ¶
type Scheduler interface { io.Closer // Name return the name of scheduler. Name() string // Worker returns next worker. Worker() Worker }
Scheduler schedule tasks.
func Elastic ¶
func Elastic() Scheduler
Elastic is a dynamic alloc scheduler. It's based on ants goroutine pool.
func ElasticBounded ¶ added in v0.3.4
func ElasticBounded() Scheduler
ElasticBounded is a dynamic scheduler with bounded size. It's based on ants goroutine pool.
func Immediate ¶
func Immediate() Scheduler
Immediate returns a scheduler which schedule tasks _immediate.
func NewAnts ¶ added in v0.4.7
func NewAnts(pool *ants.Pool) Scheduler
NewAnts creates a new scheduler over ants pool.
func NewElastic ¶ added in v0.0.9
NewElastic creates a new elastic scheduler.
func NewSingle ¶ added in v0.0.10
func NewSingle() Scheduler
NewSingle creates a new single scheduler with customized cap.
Click to show internal directories.
Click to hide internal directories.