Re: multi thread - Informix
Posted in 2004
That's a very old version of the CSDK, not a particularly buggy one that I remember though. The thing to be careful of in using ESQL/C with multi-threaded apps is that only one thread can use a particular connection to the server at a time. In order for multiple threads to share a single connection (or several for that matter) the thread that is currently accessing the connection, initially whichever thread executed the CONNECT TO statement, has to release the connection, making it dormant. Then another thread can acquire the connection and make it active for itself again making the connection dormant when it is through with it, and so on. If this is happening in an app that has a dedicated thread for the one, or for each, server connection the culprit is usually cleanup code running in the main thread trying to shutdown the connection due to some condition or event. Art S. Kagel Schummel Tam's wrote: > Dear All, > > We have a multi thread C++ program. The threads fetch data (with > prepared cursor) from an Informix DB parallel, but we got coredump (not > always) > The operating system is: ReliantUNIX-Y 5.45 B2005 RM600 4/768 R4000. We > uses the following packages: > > PKGINST: SIthreads > NAME: Threads and Reentrant System Libraries > CATEGORY: optional > ARCH: R4000 > VERSION: 5.45B20 > LOAD: 04 > BASEDIR: /opt > VENDOR: Fujitsu Siemens Computers > PSTAMP: senior020430112053 > INSTDATE: Jan 28 2004 02:29 PM > STATUS: completely installed > FILES: 288 installed pathnames > 1 partially installed pathnames > 19 shared pathnames > 30 directories > 4 executables > 17976 blocks used (approx) > > > PKGINST: ICD230C1 > NAME: INFORMIX-CLIENTSDK > CATEGORY: application.database > ARCH: R4400 > VERSION: V2.30.UC1 > PSTAMP: dagobert990604222446 > INSTDATE: Jan 28 2004 12:21 PM > STATUS: completely installed > FILES: 997 installed pathnames > 44 linked files > 64 directories > 43 executables > 103681 blocks used (approx) > > Probably something is not thread safe, or we using something wrongly . > But we don't know where is the problem. > What is the most important things in case develope a mult thread program > which use Informix DB? Have you got an example? > > Thank you in advance > Tamas Schummel >