summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-04-21 11:04:21 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2015-04-21 11:04:21 -0400
commit732fb99fc0afbeb69d684b2bfa6d0be6250919a3 (patch)
treec3112c44dd9165581b5e07c40216b1f60b1e2ee5
parentc2e3002503242331fc8f2b314e0d4f3c65de9d73 (diff)
downloadsqlalchemy-732fb99fc0afbeb69d684b2bfa6d0be6250919a3.tar.gz
- add a warning to SingletonThreadPool that it isn't for general use
-rw-r--r--lib/sqlalchemy/pool.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/sqlalchemy/pool.py b/lib/sqlalchemy/pool.py
index fc899ba30..999cc1120 100644
--- a/lib/sqlalchemy/pool.py
+++ b/lib/sqlalchemy/pool.py
@@ -810,6 +810,19 @@ class SingletonThreadPool(Pool):
Maintains one connection per each thread, never moving a connection to a
thread other than the one which it was created in.
+ .. warning:: the :class:`.SingletonThreadPool` will call ``.close()``
+ on arbitrary connections that exist beyond the size setting of
+ ``pool_size``, e.g. if more unique **thread identities**
+ than what ``pool_size`` states are used. This cleanup is
+ non-deterministic and not sensitive to whether or not the connections
+ linked to those thread identities are currently in use.
+
+ :class:`.SingletonThreadPool` may be improved in a future release,
+ however in its current status it is generally used only for test
+ scenarios using a SQLite ``:memory:`` database and is not recommended
+ for production use.
+
+
Options are the same as those of :class:`.Pool`, as well as:
:param pool_size: The number of threads in which to maintain connections