List:MySQL++« Previous MessageNext Message »
From:Jonathan Wakely Date:December 27 2007 10:21pm
Subject:Re: problems in ConnectionPool
View as plain text  
On 27/12/2007, Warren Young wrote:
> Warren Young wrote:
> >
> > I don't have a good reason for an outsider to drain a pool, but I also
> > don't have one for why an outsider shouldn't be allowed to drain a pool.
> >  So, I made this method public.
>
> 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.

If it's private and is only used by the dtor it's reasonable to
assume/require that no connections are in use when the pool is
destroyed.
Thread
problems in ConnectionPoolJonathan Wakely22 Dec
  • Re: problems in ConnectionPoolJonathan Wakely22 Dec
    • Re: problems in ConnectionPoolJonathan Wakely22 Dec
  • Re: problems in ConnectionPoolWarren Young27 Dec
    • Re: problems in ConnectionPoolWarren Young27 Dec
      • Re: problems in ConnectionPoolJonathan Wakely27 Dec
        • Re: problems in ConnectionPoolWarren Young28 Dec
    • Re: problems in ConnectionPoolJonathan Wakely27 Dec
      • Re: problems in ConnectionPoolWarren Young3 Jan