Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 310 Bytes

README.md

File metadata and controls

17 lines (14 loc) · 310 Bytes

pooli

Worker pool with dynamic size

	p := pooli.Open(context.Background(), pooli.Config{
		Goroutines: 5,
		Pipe:       make(chan pooli.Task),
	})
	p.Start()

	p.SendTask(pooli.NewTask(func(ctx context.Context) error {
		fmt.Println("task")
		return nil
	}))

	p.SetGoroutines(1)