Skip to content

Commit

Permalink
Merge pull request #291 from nats-io/doc_thread_safety
Browse files Browse the repository at this point in the history
[FIXED] Documentation missing thread-safety note
  • Loading branch information
kozlovic committed Dec 3, 2019
2 parents 8039adb + 8b345e0 commit 8c53459
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions stan.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const (

// Conn represents a connection to the NATS Streaming subsystem. It can Publish and
// Subscribe to messages within the NATS Streaming cluster.
// The connection is safe to use in multiple Go routines concurrently.
type Conn interface {
// Publish will publish to the cluster and wait for an ACK.
Publish(subject string, data []byte) error
Expand Down
2 changes: 1 addition & 1 deletion sub.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package stan is a Go client for the NATS Streaming messaging system (https://nats.io).
package stan

import (
Expand Down Expand Up @@ -40,6 +39,7 @@ type Msg struct {

// Subscription represents a subscription within the NATS Streaming cluster. Subscriptions
// will be rate matched and follow at-least once delivery semantics.
// The subscription is safe to use in multiple Go routines concurrently.
type Subscription interface {
// Unsubscribe removes interest in the subscription.
// For durables, it means that the durable interest is also removed from
Expand Down

0 comments on commit 8c53459

Please sign in to comment.