Skip to content

Commit 7ee9194

Browse files
committed
issue27113 - Document "check_same_thread" parameter in sqlite3.connect api.
Patch contributed by Dave Sawyer.
1 parent 0779129 commit 7ee9194

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Doc/library/sqlite3.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ Module functions and constants
190190
any combination of :const:`PARSE_DECLTYPES` and :const:`PARSE_COLNAMES` to turn
191191
type detection on.
192192

193+
By default, *check_same_thread* is :const:`True` and only the creating thread may
194+
use the connection. If set :const:`False`, the returned connection may be shared
195+
across multiple threads. When using multiple threads with the same connection
196+
writing operations should be serialized by the user to avoid data corruption.
197+
193198
By default, the :mod:`sqlite3` module uses its :class:`Connection` class for the
194199
connect call. You can, however, subclass the :class:`Connection` class and make
195200
:func:`connect` use your class instead by providing your class for the *factory*

0 commit comments

Comments
 (0)