Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document thread-safety #56

Open
tj opened this issue Jun 28, 2014 · 2 comments
Open

document thread-safety #56

tj opened this issue Jun 28, 2014 · 2 comments
Labels

Comments

@tj
Copy link
Contributor

tj commented Jun 28, 2014

looks like the producer is but adding a quick node about thread safety properties would be sweet! safe some digging

cheers

@mreiferson
Copy link
Member

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?

@tj
Copy link
Contributor Author

tj commented Jun 29, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants