And line 16 should read
I think....At least for using the Queue'd version, it does, otherwise the
next access to that PooledConnection fails since you just set db = None.
----- Original Message -----
From: "Chris AtLee" <catlee@...>
Sent: Wednesday, November 22, 2000 11:26 PM
Subject: Re: [Webware-discuss] Non-pickleable objects in session
> Just a quick fix:
> line 73 should read
> instead of
> I discovered this after finding out that I'm not using 0.2 or later
> packages, so threadsafety is only 1, not 2. Ach.
> ----- Original Message -----
> From: "Dan Green" <daniel.green@...>
> To: "Chris AtLee" <catlee@...>
> Cc: <webware-discuss@...>
> Sent: Wednesday, November 22, 2000 5:46 PM
> Subject: Re: [Webware-discuss] Non-pickleable objects in session
> > Because I'm an idiot, and typed "y" when I wanted to postpone, here's
> > message, in full. I've been writing non-Python too much recently. My
> > is strating to atrophy...
> > ---
> > 'cause I'm a nice guy (and despite my being almost nearly mute for the
> > little while), here's the DBPool class, originally envisioned by a bunch
> > people, implemented crappily by myself and fixed by Geoff.
> > I think Jay's used it.
> > Err. Is this part of the distribution? Can it be? If it is, mea culpa
> > duplicating it on the list.
> > In any case, using it is pretty simple. Just add an instance of it to
> > (Application makes the most sense), and instead of using the connect
> method of
> > your database module, do this:
> > conn = pool.getConnection()
> > conn will behave exactly like your database module, except that
> > will return it to the pool. It will automatically return to the pool
> > deleted (thanks to Geoff).
> > There's a wee little example at the end of the file.
> > Incidentally, howdy y'all. I'll be more active in the list and in
> > shortly. :)
> > On Wed, Nov 22, 2000 at 11:37:52AM -0500, Chris AtLee wrote:
> > > ConnectionPools sound like a good solution, thanks. It puts a bound
> > > number of database connections, which is a good thing :) So is the
> > > that you grab a connection from the pool whenever you need it?
> > >
> > > Cheers,
> > > Chris
> > >
> > > BTW, how's FormKit coming along?
> > --
> > Dan Green
> > "..so watch out, Laszlo Panaflax!"
> > - Troy McClure
> Webware-discuss mailing list