Access to Oracle Pro * C from multiple threads

I work on a C ++ server that uses Oracle as a backend through Pro * C.

We now have a significant problem with running queries on unrelated tables from multiple threads. The documentation I could find talks about using mutexes, etc. For synchronization.

My experience with other databases, such as MySQL on Linux, arises if you use the same connection across multiple threads. The problem was solved by creating a connection descriptor for the stream.

Is there a trick that allows us to use Oracle Pro * C in a similar way? It seems that an enterprise-class DB that does not support this kind of functionality in version 10+ is somewhat unlikely.

+4
source share
1 answer

Do you know about the precompiler pro * c option? Threads and multithreaded programming issues ?

With THREADS = YES specified on the command line, Precompiler Pro * C / C ++ ensures that the generated code is thread safe, given that you follow the recommendations.

+4
source

Source: https://habr.com/ru/post/1400392/


All Articles