Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Unix multithreaded program using Pro*C

Re: Unix multithreaded program using Pro*C

From: <The.Central.Scrutinizer.wakawaka_at_invalid.pobox.com>
Date: Mon, 14 May 2001 20:59:15 GMT
Message-ID: <slrn9g0f7h.eq4.The.Central.Scrutinizer.wakawaka@C1459607-A.arvada1.co.home.com>

On Mon, 14 May 2001 22:35:18 +0200, Jeroen <jeroenthuis_at_gmx.net> wrote:
>Question,
>
>
>Currently i am developing a (multithreaded) program in C++ which uses Pro*C.
>I already have it runing on windows NT, now i am porting it to Unix ( Dec
>Alpha ). The program basically starts up a thread that performs database
>retrieves and updates. The main thread passes all the commands to be
>performed by the database thread in a piece of shared memory. The database
>thread gets the data from the shared memory, performs the database action,
>and puts the result back in the shared data ( this is done, because the
>Pro*C calls are blocking, and i want the app to continue whatever happens).
>The class which i use as shared memory, contains several static members
>which can be set and get ( incapsulated by mutexes ). This class also
>contains some pointers. These pointers point to memory, allocated by the
>mainthread using new operator. The problem is that i get all kinds of
>errors, memory faults, segmentation fault even a stack overflow. This errors
>occur in the Pro*C calls, but i cannot find the problem. I am afraid the way
>memory is shared between threads in NT differs from Unix, but i am not sure.
>I also created some Pro*C code using statements as SQL ENABLE THREADS and
>use contexes, but it doesnt help, which i guessed because there is only one
>thread accessing the database. I compile and link using multithreaded
>libraries. Does anybody have a clue of what is going on here ?
>
>Thanks in advance, Jeroen

I worked on a project that did multithreaded statistical modeling. We used RPC's (via DCE and encina; nowadays corba would be the way to go) to isolate the multithreaded computational task from the processes doing the database queries and writes. Received on Mon May 14 2001 - 15:59:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US