summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2016-06-03 07:04:28 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2016-06-03 07:04:28 (GMT)
commit194a4a245acae6219a3a2eda6e849c25c26052cf (patch)
treefa4991c374c730c83f8488f5b9b42f47d6a85131
parent464afee749716588e54d0de38b28fbe3ef106fd3 (diff)
parent7ee91942b4c68d0d0ca9db9aace40d4bc918195b (diff)
downloadcpython-194a4a245acae6219a3a2eda6e849c25c26052cf.zip
cpython-194a4a245acae6219a3a2eda6e849c25c26052cf.tar.gz
cpython-194a4a245acae6219a3a2eda6e849c25c26052cf.tar.bz2
[merge from 3.5] - issue27113 - Document "check_same_thread" parameter in sqlite3.connect api.
Patch contributed by Dave Sawyer.
-rw-r--r--Doc/library/sqlite3.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index f6e5384..996e93e 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -190,6 +190,11 @@ Module functions and constants
any combination of :const:`PARSE_DECLTYPES` and :const:`PARSE_COLNAMES` to turn
type detection on.
+ By default, *check_same_thread* is :const:`True` and only the creating thread may
+ use the connection. If set :const:`False`, the returned connection may be shared
+ across multiple threads. When using multiple threads with the same connection
+ writing operations should be serialized by the user to avoid data corruption.
+
By default, the :mod:`sqlite3` module uses its :class:`Connection` class for the
connect call. You can, however, subclass the :class:`Connection` class and make
:func:`connect` use your class instead by providing your class for the *factory*