diff options
author | Marcos Pereira <3464445+marcospgp@users.noreply.github.com> | 2023-02-01 23:52:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-01 23:52:29 (GMT) |
commit | ee21110086e277a0ac24f5f768f35847b4db3380 (patch) | |
tree | 7520c24b4c37d4b8c029645765fd265ebb65feae /Doc | |
parent | ae9b38f4241a7d62ec4e9b775d4436d762b11fb3 (diff) | |
download | cpython-ee21110086e277a0ac24f5f768f35847b4db3380.zip cpython-ee21110086e277a0ac24f5f768f35847b4db3380.tar.gz cpython-ee21110086e277a0ac24f5f768f35847b4db3380.tar.bz2 |
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>
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/sqlite3.rst | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index c0f0f13..bbdc891 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -302,10 +302,13 @@ Module functions :type isolation_level: str | None :param bool check_same_thread: - If ``True`` (default), only the creating thread may use the connection. - If ``False``, the connection may be shared across multiple threads; - if so, write operations should be serialized by the user to avoid data - corruption. + If ``True`` (default), :exc:`ProgrammingError` will be raised + if the database connection is used by a thread + other than the one that created it. + If ``False``, the connection may be accessed in multiple threads; + write operations may need to be serialized by the user + to avoid data corruption. + See :attr:`threadsafety` for more information. :param Connection factory: A custom subclass of :class:`Connection` to create the connection with, |