DBPool is dbi agnostic. Threadsafety is determined by checking the db module's threadsafety parameter. The "standard" postgre module is not threadsafe, so that's what we are referring to. psycopg would not fall into the unthreadsafe category. The DBPool would determine that it is threadsafe automagically.
Jay > -----Original Message----- > From: Federico Di Gregorio [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 31, 2002 3:03 PM > To: 'Webware Discuss' > Subject: Re: [Webware-discuss] DBPool > > > Il gio, 2002-01-31 alle 20:55, Jeff Johnson ha scritto: > > I'm trying to subclass DBPool so that it takes the > connections out of > > transaction mode when they are created and I'd like to do > it in such a > > way that if DBPool is updated, my subclass will still work > properly but > > I don't think the hooks are there for it. > > > > My attempt was this: > > > > class DBPoolNoTrans(DBPool): > > def _threadsafe_addConnection(self, con): > > con.cursor().execute("rollback") > > DBPool._threadsafe_addConnection(self, con) > > > > def _unthreadsafe_addConnection(self, con): > > con.cursor().execute("rollback") > > DBPool._unthreadsafe_addConnection(self, con) > > > > > > Unfortunately, the un-thread safe version (postgres) calls > addConnection > > every time the connection is returned to the pool. The thread safe > > just a question: why is postgres unthreadsafe? (and where do > i find the > code for postgresql dbpool? i want to patch it to use psycopg...) > > -- > Federico Di Gregorio > Debian GNU/Linux Developer & Italian Press Contact > [EMAIL PROTECTED] > INIT.D Developer > [EMAIL PROTECTED] > The number of the beast: vi vi vi. -- > Delexa Jones > ---------------------------------------------------------------------------- This e-mail and any attachments may be confidential or legally privileged. If you received this message in error or are not the intended recipient, you should destroy the e-mail message and any attachments or copies, and you are prohibited from retaining, distributing, disclosing or using any information contained herein. Please inform us of the erroneous delivery by return e-mail. Thank you for your cooperation. ---------------------------------------------------------------------------- _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
