Project is archived. For actual code look at: https://github.com/peakle/bees
Bees - simple and lightweight worker pool for go.
only 37MB used for 500k workers pool
// Example - demonstrate pool usage
func Example() {
pool := Create(context.Background(),
func(ctx context.Context, task interface{}) { fmt.Println(task) },
)
defer pool.Close()
pool.Submit(1)
pool.Submit(2)
pool.Submit(3)
// Output:
// 1
// 2
// 3
}