mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
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>
This commit is contained in:
parent
ae9b38f424
commit
ee21110086
1 changed files with 7 additions and 4 deletions
|
@ -302,10 +302,13 @@ Module functions
|
||||||
:type isolation_level: str | None
|
:type isolation_level: str | None
|
||||||
|
|
||||||
:param bool check_same_thread:
|
:param bool check_same_thread:
|
||||||
If ``True`` (default), only the creating thread may use the connection.
|
If ``True`` (default), :exc:`ProgrammingError` will be raised
|
||||||
If ``False``, the connection may be shared across multiple threads;
|
if the database connection is used by a thread
|
||||||
if so, write operations should be serialized by the user to avoid data
|
other than the one that created it.
|
||||||
corruption.
|
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:
|
:param Connection factory:
|
||||||
A custom subclass of :class:`Connection` to create the connection with,
|
A custom subclass of :class:`Connection` to create the connection with,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue