raymondzhaoy / limiter

go lang concurrency limiter.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go lang goroutine concurrency limiter

builds

Build Status

example

limit the number of concurrent go routines to 10:

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

About

go lang concurrency limiter.


Languages

Language:Go 98.8%Language:Makefile 1.2%