Replies: 4 comments 2 replies
-
No, it is not goruoutine-safe. You can't call |
Beta Was this translation helpful? Give feedback.
-
Thanks. I implemented pool using https://github.com/jackc/puddle (also support generics). Another issue, is that |
Beta Was this translation helpful? Give feedback.
-
Could you add a big warning in the readme with this? It's looking great and I will probably switch to this in the future but low-level or not I think that reconnect, pooling and thread safe connections are essential features for db clients that most users will take for granted if it is not specified in the readme. Keep up the good work, we're looking forward to it! |
Beta Was this translation helpful? Give feedback.
-
@ernado In order for me to fully understand the problem, even if it's separated package, theoretically, what would need to be done for Do to support concurrency? Pool acquire and release will allow not using mutexes on the Do but it adds overhead of connection establishment. Would like to understand problem from your perspective. Perhaps I can help here? |
Beta Was this translation helpful? Give feedback.
-
Could you please clarify — is
ch.Client
thread safe, is it possible performDo
in several goroutines in the same time?Beta Was this translation helpful? Give feedback.
All reactions