Skip to content

Commit

Permalink
pubsub: clarify doc for ReceiveSettings.NumGoroutines
Browse files Browse the repository at this point in the history
Fixes #712.

Change-Id: I0c28081933c35ed3f2baf1617f39a2f92c7fd552
Reviewed-on: https://code-review.googlesource.com/15690
Reviewed-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Michael Darakananda <pongad@google.com>
  • Loading branch information
jba committed Aug 10, 2017
1 parent 4226ba9 commit 40ffb42
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pubsub/subscription.go
Expand Up @@ -152,6 +152,12 @@ type ReceiveSettings struct {
// NumGoroutines is the number of goroutines Receive will spawn to pull
// messages concurrently. If NumGoroutines is less than 1, it will be treated
// as if it were DefaultReceiveSettings.NumGoroutines.
//
// NumGoroutines does not limit the number of messages that can be processed
// concurrently. Even with one goroutine, many messages might be processed at
// once, because that goroutine may continually receive messages and invoke the
// function passed to Receive on them. To limit the number of messages being
// processed concurrently, set MaxOutstandingMessages.
NumGoroutines int
}

Expand Down

0 comments on commit 40ffb42

Please sign in to comment.