9 messages in com.mysql.lists.plusplusRe: problems in ConnectionPool
FromSent OnAttachments
Jonathan Wakely22 Dec 2007 08:07.patch
Jonathan Wakely22 Dec 2007 12:42.patch
Jonathan Wakely22 Dec 2007 13:55 
Warren Young26 Dec 2007 19:41 
Warren Young26 Dec 2007 19:53 
Jonathan Wakely27 Dec 2007 14:16.cpp
Jonathan Wakely27 Dec 2007 14:20 
Warren Young28 Dec 2007 01:21 
Warren Young03 Jan 2008 10:58 
Subject:Re: problems in ConnectionPool
From:Warren Young (mysq@etr-usa.com)
Date:12/28/2007 01:21:13 AM
List:com.mysql.lists.plusplus

Jonathan Wakely wrote:

On further consideration, I wonder if clear() shouldn't be overloaded, with one version being protected and taking a bool "force" parameter. If force, destroying in-use connections is allowed. Else, not.

Ah yes, making it public means you have to worry about that.

Okay, the resolution is that clear() is protected again and takes a bool parameter whose default of true makes it work the way clear() does in STL. Then, added a public shrink() method that passes false to clear(), making it remove only unused connections.