Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

0x9n0p/pooli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Golang goroutine pool with dynamic size

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages