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

Are the clients thread safe? #212

Open
aliaksandrb opened this issue Sep 30, 2024 · 0 comments
Open

Are the clients thread safe? #212

aliaksandrb opened this issue Sep 30, 2024 · 0 comments

Comments

@aliaksandrb
Copy link

Hi! Thanks for this great library, we extensively using it in our project! 👍

Quick question though, are the clients created via ::Gruf::Client.new are thread safe? Could it be initialized once and reused for the lifetime of the application?

Documentation explicitly shows how configuration for Gruf is set in initializer, but examples of usage demonstrated in different sections outside of initializer and I haven't found any referenced to recommended usage pattern.

Which leads me to thinking that client should be created on per-request basis. Is it correct?

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

No branches or pull requests

1 participant