As far as I now you should use the CVS version with the new functions:
int dbi_initialize_r(const char *driverdir, dbi_inst *pInst);
void dbi_shutdown_r(dbi_inst Inst);
int dbi_set_verbosity_r(int verbosity, dbi_inst Inst);
dbi_driver dbi_driver_list_r(dbi_driver Current, dbi_inst Inst);
dbi_driver dbi_driver_open_r(const char *name, dbi_inst Inst);
dbi_conn dbi_conn_new_r(const char *name, dbi_inst Inst);
replacing the old ones same name, without "_r". These should be thread safe.
You also would need and additional parameter to "dbi_initialize_r" declared
as type "dbi_inst".
Daniel.-
On Thu, Jun 26, 2008 at 5:09 PM, AiFiLTr0 The GreAt <[EMAIL PROTECTED]>
wrote:
>
>
> On Thursday 26 June 2008 22:07:09 you wrote:
> > Hi,
> > I've been working in a multithread server using libdbi against postgre.
> > My implementation use a connection per thread and is working well for
> now,
> > I'm doing testing yet. I had some problems before, but using the cvs
> > version with the "_r" functions works fine.
> > I'm interested about libdbi and thread issues.
> >
> > Regards.
> > Daniel.
> >
> > On Thu, Jun 26, 2008 at 2:59 PM, Claudiu CISMARU <[EMAIL PROTECTED]>
> wrote:
> > > > So the question is, is there anything that can be done with
> > > > multithreading
> > > > at this time?
> > >
> > > Create a mutex and lock it per connection. It will solve your problem.
> > >
> > >
> > > --
> > > Claudiu Nicolaie CISMARU
> > > GNU GPG Key: http://claudiu.targujiu.net/claudiu.gpg
> > > T: 0752095451, 0788358901
> > > E: [EMAIL PROTECTED], [EMAIL PROTECTED]
> > >
> > >
> -------------------------------------------------------------------------
> > > Check out the new SourceForge.net Marketplace.
> > > It's the best place to buy or sell services for
> > > just about anything Open Source.
> > > http://sourceforge.net/services/buy/index.php
> > > _______________________________________________
> > > libdbi-users mailing list
> > > libdbi-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/libdbi-users
>
> Well, that's the actual thing I'm using, but I've just written a pool to
> manage all the connections dynamically and keep their number down, since not
> all the threads may require a database connection at the same time. However,
> I'm not using th cvs version, therefore I'll try it, Thanks for the tip.
> I'll post back later, once I've tested it.
>
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> libdbi-users mailing list
> libdbi-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libdbi-users
>
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users