From 35061c24f768c558b4b1853c5a453ca2b7242537 Mon Sep 17 00:00:00 2001 From: Shubham Sharma Date: Tue, 21 Sep 2021 22:20:24 +0530 Subject: [PATCH] Update docs Update documentation of __init__ func of ThreadedConnectionPool --- lib/pool.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/pool.py b/lib/pool.py index cf7b3e4d..45b9f8af 100644 --- a/lib/pool.py +++ b/lib/pool.py @@ -156,7 +156,27 @@ class ThreadedConnectionPool(AbstractConnectionPool): """A connection pool that works with the threading module.""" def __init__(self, minconn, maxconn, *args, **kwargs): - """Initialize the threading lock.""" + """Initializes a new instance of ThreadedConnectionPool. + + Parameters + ---------- + minconn : int + The minimum number of connections that should be automatically + created when you initialize the connection pool. + maxconn : int + The maximum number of connections that will be supported by this + connection pool + args : optional, positional arguments + Usually this arguments are passed to the underlying ``connect`` method + of psycopg2 + args : optional, positional arguments + Usually these are passed to the underlying ``connect`` method + of psycopg2 + kwargs : optional, keyword only arguments + Usually these are passed to the underlying ``connect`` method + of psycopg2 + """ + import threading AbstractConnectionPool.__init__( self, minconn, maxconn, *args, **kwargs)