-
Hi, I'm writing a multithread(go routine) application, and it is newly started It has a producer consumer approach to handle some tcp-ip requests, and requests are very much(near 1500 requests per second), they should call some plsql functions per request. and this was done by C and we are deciding to migrate to GO Our server is AIX and the only go oracle driver which supports cross-compilation for our environment is your great package We used PRO*C pre-compiler provided by oracle in our C codes, it supports multithreads and we implement a connection pool to use My question is: can we use your package and don't worry about concurrencies? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
yes of course the only difference between this method and connection pooling is that connection pooling preserve a number of open connection (predefined) during program execution then when you call open you take control of one connection until you release it by close and so on thus the time of open and close connection is positioned at the beginning and at the end of the program, |
Beta Was this translation helpful? Give feedback.
-
it also seem that the package database/sql internally support connection pooling thus you can use the connection object safely between threads in multi-thread application see this code from official Golang package site here
|
Beta Was this translation helpful? Give feedback.
it also seem that the package database/sql internally support connection pooling thus you can use the connection object safely between threads in multi-thread application
see this code from official Golang package site here