diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-09-04 21:02:35 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-09-04 21:02:35 -0400 |
commit | 1f65ac6679298c7f18e8ff3b13d6694e357ed5d5 (patch) | |
tree | 9e14201ee927efd5f76339127358b78019945e54 /lib/sqlalchemy/engine | |
parent | b42cbed42765cd00962868c248cee4b1b448c948 (diff) | |
download | sqlalchemy-1f65ac6679298c7f18e8ff3b13d6694e357ed5d5.tar.gz |
roughly the finished product.
Diffstat (limited to 'lib/sqlalchemy/engine')
-rw-r--r-- | lib/sqlalchemy/engine/base.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index 14ebf916b..20e7e2338 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -801,7 +801,20 @@ class Connection(Connectable): as ClauseElement, Compiled and DefaultGenerator objects. Provides a :meth:`begin` method to return Transaction objects. - The Connection object is **not** thread-safe. + The Connection object is **not** thread-safe. While a Connection can be + shared among threads using properly synchronized access, it is still + possible that the underlying DBAPI connection may not support shared + access between threads. Check the DBAPI documentation for details. + + The Connection object represents a single dbapi connection checked out + from the connection pool. In this state, the connection pool has no affect + upon the connection, including its expiration or timeout state. For the + connection pool to properly manage connections, connections should be + returned to the connection pool (i.e. ``connection.close()``) whenever the + connection is not in use. If your application has a need for management + of multiple connections or is otherwise long running (this includes all + web applications, threaded or not), don't hold a single connection open at + the module level. .. index:: single: thread safety; Connection |