We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42b3178 commit 37e7f08Copy full SHA for 37e7f08
semaphore/semaphore.go
@@ -32,9 +32,9 @@ type Weighted struct {
32
waiters list.List
33
}
34
35
-// Acquire acquires the semaphore with a weight of n, blocking only until ctx
36
-// is done. On success, returns nil. On failure, returns ctx.Err() and leaves
37
-// the semaphore unchanged.
+// Acquire acquires the semaphore with a weight of n, blocking until resources
+// are available or ctx is done. On success, returns nil. On failure, returns
+// ctx.Err() and leaves the semaphore unchanged.
38
//
39
// If ctx is already done, Acquire may still succeed without blocking.
40
func (s *Weighted) Acquire(ctx context.Context, n int64) error {
0 commit comments