Re: Designing a better connection pool for psycopg3

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Designing a better connection pool for psycopg3
Дата
Msg-id CABUevExMQQB3=xShPie+XR04kctiR8-P_BEUz1BmCyDLhU_yhg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Designing a better connection pool for psycopg3  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Ответы Re: Designing a better connection pool for psycopg3  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Список psycopg
On Mon, Jan 18, 2021 at 2:50 PM Daniele Varrazzo
<daniele.varrazzo@gmail.com> wrote:
>
> On Mon, 18 Jan 2021 at 14:13, Karsten Hilbert <Karsten.Hilbert@gmx.net> wrote:
>
> > I would strongly advise against making sys.exit() the default
> > for pool.terminate() unless I misunderstand something.
>
> How would you terminate the program if a maintenance thread, not the
> main one, thinks that the program is not in working state?

Why would it be OK for a maintenance thread to terminate the program
at all? And certainly by default?

Wouldn't the reasonable thing to do be to flag the pool as broken, and
then just stop trying. Then whenever the application makes an attempt
to use the pool, it can he thrown an exception saying that this
happened.

-- 
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/



В списке psycopg по дате отправления:

Предыдущее
От: Daniele Varrazzo
Дата:
Сообщение: Re: Designing a better connection pool for psycopg3
Следующее
От: Karsten Hilbert
Дата:
Сообщение: Re: Designing a better connection pool for psycopg3