Also having stuff like a concurrency limiter (instead of doing weird var limiter chan struct{} and using it as `limiter <- struct{}{}` and `defer <-limiter`) as a library function in `sync` package would be great too.
Also having stuff like a concurrency limiter (instead of doing weird var limiter chan struct{} and using it as `limiter <- struct{}{}` and `defer <-limiter`) as a library function in `sync` package would be great too.
there's https://pkg.go.dev/golang.org/x/time/rate ...
But I guess the issue is that oftentimes, it is more of a distributed system coordination issue?
What use case do you have in mind?