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

Is the clickhouse-rs client thread safe? #179

Open
monadbobo opened this issue Sep 5, 2022 · 1 comment
Open

Is the clickhouse-rs client thread safe? #179

monadbobo opened this issue Sep 5, 2022 · 1 comment

Comments

@monadbobo
Copy link

monadbobo commented Sep 5, 2022

For example if I use the same pool object in multiple tokio tasks will there be undefined behavior.

Or should I share the connection through Arc in different tasks, or should each task call pool.clone() to share the connection。

@suharev7
Copy link
Owner

suharev7 commented Sep 5, 2022

Yes, it's thread safe. 'pool.clone()' and sharing the connection through Arc will both work correctly.

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

No branches or pull requests

2 participants