public inbox for [email protected]
help / color / mirror / Atom feedFrom: Daniele Varrazzo <[email protected]>
To: Daniele Varrazzo <[email protected]>
To: [email protected]
Subject: Re: Designing a better connection pool for psycopg3
Date: Mon, 18 Jan 2021 15:31:44 +0100
Message-ID: <CA+mi_8b7Vg3+yS84mNKc2ToOEuvkXDC+QMFeT7Y5=Z3jP8wRJw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CA+mi_8aZQXzB8Kr4V0nps3aMQ74N72uWC=pZF0P1H7AW4GLasA@mail.gmail.com>
<[email protected]>
<CA+mi_8a-0Wx62eziOBwp-=ryBynsqrgx4AcBGW5+pSr3vZXjHg@mail.gmail.com>
<[email protected]>
On Mon, 18 Jan 2021 at 15:19, Karsten Hilbert <[email protected]> wrote:
>
> Am Mon, Jan 18, 2021 at 02:50:34PM +0100 schrieb Daniele Varrazzo:
>
> > > 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?
>
> To me it is not the business of a library to terminate its
> user (eg an application) upon resource starvation. After all,
> the app may be perfectly fine with not being able to talk to
> the database. Only it knows what to do under such
> circumstances.
>
> If one wants to support such machinery, I would suggest a
> callback into the application, set up by the application
> code.
Thank you for the feedback, Karsten. Probably a customisable no-op
callback is a better default behaviour :)
-- Daniele
view thread (19+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: Designing a better connection pool for psycopg3
In-Reply-To: <CA+mi_8b7Vg3+yS84mNKc2ToOEuvkXDC+QMFeT7Y5=Z3jP8wRJw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox