Skip to content

Commit 883aed5

Browse files
kamikazechasergopherbot
authored andcommitted
rate: add documentation on Limiter concurrent usage
Closes golang/go#17261 Change-Id: Ifeacc8df45fb59e7781ddcc35c2fde0aa80188eb Reviewed-on: https://go-review.googlesource.com/c/time/+/530855 Auto-Submit: Sameer Ajmani <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> Reviewed-by: Sameer Ajmani <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent b24d3b5 commit 883aed5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rate/rate.go

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ func Every(interval time.Duration) Limit {
5252
// or its associated context.Context is canceled.
5353
//
5454
// The methods AllowN, ReserveN, and WaitN consume n tokens.
55+
//
56+
// Limiter is safe for simultaneous use by multiple goroutines.
5557
type Limiter struct {
5658
mu sync.Mutex
5759
limit Limit

0 commit comments

Comments
 (0)