> -----Original Message-----
> From: Norbert Sendetzky [mailto:norb...@linuxnetworks.de]
> Sent: Friday, September 17, 2010 9:35 AM
> To: OpenDBX devel list
> Subject: Re: [opendbx] ODBX_OPT_THREAD_SAFE
> 
> > Understood, but then I'm confused as to what this option's presence
> > is really telling me.  Is it saying "safe to use one connection with
> > many threads" or "safe to create multiple connections per thread" or
> > something else?
> 
> It states: "It's safe to use this backend in an application which
> consists of different threads using at least one connection".

Right, I find that wording a bit ambiguous.

> If odbx_get_option(ODBX_OPT_THREAD_SAFE) returns 0, you should only use
> this backend in applications where each process has it's own memory
> space. This is because at least one function in the native database
> client reuse the same statically allocated memory at each call.

So basically the backend library is using globals or something that's not 
thread-safe at all regardless of how one might use the library.  The 
description states one particular way that a multi-threaded program could use 
an API, so I wasn't clear on whether the flag discusses that specific possible 
use, versus any possible multi-threaded use.

I would suggest instead: "It is safe to use this backend in a multi-threaded 
application."

Cheers,
-MSK

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
libopendbx-devel mailing list
libopendbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libopendbx-devel
http://www.linuxnetworks.de/doc/index.php/OpenDBX

Reply via email to