Bees - simple and lightweight worker pool for go.
only 37MB used for 500k workers pool
package main
import (
"context""fmt""github.com/peakle/bees"
)
// Example - demonstrate pool usagefuncExample() {
pool:=bees.Create(context.Background())
deferpool.Close()
t:=1task:=func(ctx context.Context) {
t++fmt.Println(t)
}
pool.Submit(task)
pool.Submit(task)
pool.Submit(task)
pool.Wait()
// Output:// 1// 2// 3
}

