about thread
From: captain biceps (spe_at_x-media.fr)
Date: 08/16/04
- Next message: Ron Hardin: "Re: Array pointers"
- Previous message: Erik Max Francis: "Re: Array pointers"
- Next in thread: QNils_O=2E_Sel=E5sdal=22?=: "Re: about thread"
- Reply: QNils_O=2E_Sel=E5sdal=22?=: "Re: about thread"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 16 Aug 2004 21:19:22 +0200
Hi,
I have to use an oracle/sybase driver into a C program.
It's a little serveur which wait incoming connection then fork each client
and create a db connection.
classic...
But now, I must develop under Linux AND Windows, and -of course- win32
doesn't support fork()
So, Thread seems to be a cool solution...
but -it was to easy :)- the version of sybase (and Oracle too I think) isn't
thread-safe.
So I was thinking...
In my thread function, If I load dynamically all the .so to instance them...
eg:
// each thread for each client
fct_threaded(void *...)
{
hdl = dlopen( db_sybora.so... );
ptr1 = dlsym(hdl, ....);
ptr2 = dlsym(hdl, ...);
//
ptr1(...)
etc...
}
Do you think it's a good solution ?
Better idea ?
thanx guys...
- Next message: Ron Hardin: "Re: Array pointers"
- Previous message: Erik Max Francis: "Re: Array pointers"
- Next in thread: QNils_O=2E_Sel=E5sdal=22?=: "Re: about thread"
- Reply: QNils_O=2E_Sel=E5sdal=22?=: "Re: about thread"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|