Re: Is it safe to use same ZODB connection across two threads with lock

Jim Fulton <[email protected]>
Newsgroups gmane.comp.web.zope.zodb
Message-ID <CAPDm-FjALiD4PPqEgjr_F7tzZQqwge8zdvQdmNiWTxTavQVgeQ@mail.gmail.com>
On Mon, May 30, 2016 at 7:36 AM, Sanjay Rao <[email protected]> wrote:
> Is it safe to use same ZODB connection with two threads ?
> Assuming that there is a lock which ensures that connection won't be used
> simultaneously with two threads ?

Yes, and you also need to pass a non-shared transaction manager when
opening the connection. By default, the connection will use a
thread-local transaction manager.

Of course, this is an advanced usage.

Jim

-- 
Jim Fulton
http://jimfulton.info

-- 
You received this message because you are subscribed to the Google Groups "zodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.