Skip to content

Commit

Permalink
rate: add documentation on Limiter concurrent usage
Browse files Browse the repository at this point in the history
Closes golang/go#17261

Change-Id: Ifeacc8df45fb59e7781ddcc35c2fde0aa80188eb
Reviewed-on: https://go-review.googlesource.com/c/time/+/530855
Auto-Submit: Sameer Ajmani <sameer@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Sameer Ajmani <sameer@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
  • Loading branch information
kamikazechaser authored and gopherbot committed Nov 21, 2023
1 parent b24d3b5 commit 883aed5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rate/rate.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ func Every(interval time.Duration) Limit {
// or its associated context.Context is canceled.
//
// The methods AllowN, ReserveN, and WaitN consume n tokens.
//
// Limiter is safe for simultaneous use by multiple goroutines.
type Limiter struct {
mu sync.Mutex
limit Limit
Expand Down

0 comments on commit 883aed5

Please sign in to comment.