Hi,

I haven't had a real look at the code, so sorry if I'm posting nonsense
here.

On Mon, Sep 06, 2010 at 04:47:12PM +0200, Markus Hoenicka wrote:
> Andreas Ericsson <a...@op5.se>:
> Maybe I'm a bit over-cautious, but I'd like to avoid the impression  
> that using the _i/_r functions will allow to build thread-safe  
> applications out of the box. We still have a problem with our error  
> messages, as these share one buffer per connections.

As far as I see, the "dbi_conn_new_?" function returns a connection and
none of the concerned functions take a function as an argument. So I
would expect to be able to allocate many connection objects in parallel
but not necessarily to be able to use one connection object from
multiple threads simultaneously.

Even with a hypothetical function such as
  int dbi_conn_foo_r (dbi_conn c, void *arg);
I would expect to be able to call this functions simultaneously from
multiple threads *provided* that each thread uses its own "dbi_conn"
object.

> Applications that  share connections between threads easily run into
> problems here.  

My points basically are:
1) Functions handling connections don't have the "_r" suffix.
2) Even if they did, I would not expect to be able to call them with the
   same "dbi_conn" object.

That's my $.02 …

Regards,
—octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x0C705A15
http://octo.it/

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
libdbi-devel mailing list
libdbi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-devel

Reply via email to