Replies: 1 comment
-
Hi. Sure, no problem.
2 notable exceptions are:
Other than that, there is no transient state in the connection object - as long as settings are not changed, it can be considered thread-safe So speaking of best practice patterns, I would say:
|
Beta Was this translation helpful? Give feedback.
-
A appologize in advance, this is not an issue but more of a question.
I read the page about connection lifetime & pooling and it is rather technical, e.g. to understand what is going on, one would ideally have deep understanding what
System.Net.Http.HttpClient
does, how does it do pooling internally and how it gets used by ClickHouse.Client.What I'd like to know is simply: if I have an open connection, what happens if I pass the same connection to two async tasks, that might use that same connection concurrently?
Will in such case ...
a) all hell break lose,
b) or it will run but operations will be passed to the database sequentially,
c) or it will run fine with requests passed to the database concurrently?
Ideally, a short paragraph about that would be nice also in the above document (implementation information is useful for hardcore dotnet developers, but not many people are familiar with all the nitty gritty technical details and would benefit more with a clear explanation of what happens and what the best use pattern is).
Thanks. I love this driver.
Beta Was this translation helpful? Give feedback.
All reactions