]> git.ipfire.org Git - thirdparty/psycopg.git/commit
Don't use a worker in pool.putconn() if not needed
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 11 Mar 2021 14:31:55 +0000 (15:31 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 12 Mar 2021 04:07:25 +0000 (05:07 +0100)
commitf8b9a7f1559dcb13d643b35a26d58049e20933cd
tree36b7fbd6e908ca0d3664bc3d5d896ac4067dac57
parentcc2d00274179c604c6c0ff2214fcfd0c022a4bf0
Don't use a worker in pool.putconn() if not needed

If _reset is not set there is little work to do so the overhead of a
context switch is measurable and not necessary.
psycopg3/psycopg3/pool/async_pool.py
psycopg3/psycopg3/pool/pool.py