8000 Docs: improve accuracy of sqlite3 `check_same_thread` parameter (GH-1… · python/cpython@f8abe75 · GitHub
[go: up one dir, main page]

Skip to content

Commit f8abe75

Browse files
miss-islingtonmarcospgperlend-aaslandCAM-Gerlach
authored
Docs: improve accuracy of sqlite3 check_same_thread parameter (GH-101351)
(cherry picked from commit ee21110) Co-authored-by: Marcos Pereira <3464445+marcospgp@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
1 parent b8bb139 commit f8abe75

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
@@ -299,10 +299,13 @@ Module functions
299299
:type isolation_level: str | None
300300

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

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

0 commit comments

Comments
 (0)
0