Package scheduler implements a task scheduler.
go get github.com/hslam/scheduler
import "github.com/hslam/scheduler"
package main
import (
"github.com/hslam/scheduler"
"sync"
)
func main() {
s := scheduler.New(64, nil)
wg := &sync.WaitGroup{}
for i := 0; i < 100000; i++ {
wg.Add(1)
task := func() {
wg.Done()
}
s.Schedule(task)
}
wg.Wait()
s.Close()
}
This package is licensed under a MIT license (Copyright (c) 2021 Meng Huang)
scheduler was written by Meng Huang.