From: Senthil Kumaran Date: Fri, 3 Jun 2016 07:03:48 +0000 (-0700) Subject: issue27113 - Document "check_same_thread" parameter in sqlite3.connect api. X-Git-Tag: v3.5.2rc1~74^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7ee91942b4c68d0d0ca9db9aace40d4bc918195b;p=thirdparty%2FPython%2Fcpython.git issue27113 - Document "check_same_thread" parameter in sqlite3.connect api. Patch contributed by Dave Sawyer. --- diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index f6e538489ce0..996e93eb77ea 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*