go-nsq
go-nsq copied to clipboard
document thread-safety
looks like the producer is but adding a quick node about thread safety properties would be sweet! safe some digging
cheers
Yea, I think this is a good idea.
In my experience the convention is that if it's not explicitly stated as goroutine safe than the assumption is that it isn't.
I think in most cases library authors try to avoid assuming how you might want to synchronize your application and thus avoid bundling in those assumptions.
go-nsq might be in a bit different category though since it's pretty opinionated in how it should be used.
Out of curiosity, Which components/methods in particular were you questioning?
Yeah that's the thing I'm finding with Go, people don't seem to document thread-safety so you're left digging around haha, I generally agree on delegating unless the granular locking is a big win then it probably makes sense to implement/document. I was just wondering about publishing in this case