Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 351 Bytes

README.md

File metadata and controls

20 lines (14 loc) · 351 Bytes

go lang goroutine concurrency limiter

builds

Build Status

example

limit the number of concurrent go routines to 10:

  limit := limiter.New(10)
  for i := 0; i < 1000; i++ {
  	limit.Execute(func() {
  		// do some work
  	})
  }
  limit.Wait()