Skip to content

Commit ee21110

Browse files
marcospgperlend-aaslandCAM-Gerlach
authored
Docs: improve accuracy of sqlite3 check_same_thread parameter (#101351)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
1 parent ae9b38f commit ee21110

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Doc/library/sqlite3.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,13 @@ Module functions
302302
:type isolation_level: str | None
303303

304304
:param bool check_same_thread:
305-
If ``True`` (default), only the creating thread may use the connection.
306-
If ``False``, the connection may be shared across multiple threads;
307-
if so, write operations should be serialized by the user to avoid data
308-
corruption.
305+
If ``True`` (default), :exc:`ProgrammingError` will be raised
306+
if the database connection is used by a thread
307+
other than the one that created it.
308+
If ``False``, the connection may be accessed in multiple threads;
309+
write operations may need to be serialized by the user
310+
to avoid data corruption.
311+
See :attr:`threadsafety` for more information.
309312

310313
:param Connection factory:
311314
A custom subclass of :class:`Connection` to create the connection with,

0 commit comments

Comments
 (0)