Skip to content

Commit 5d8cd24

Browse files
committed
Issue #3854: Documented using the sqlite3 module with multiple threads.
1 parent e56a386 commit 5d8cd24

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Doc/library/sqlite3.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,3 +840,18 @@ exception, the transaction is rolled back; otherwise, the transaction is
840840
committed:
841841

842842
.. literalinclude:: ../includes/sqlite3/ctx_manager.py
843+
844+
845+
Common issues
846+
-------------
847+
848+
Multithreading
849+
^^^^^^^^^^^^^^
850+
851+
Older SQLite versions had issues with sharing connections between threads.
852+
That's why the Python module disallows sharing connections and cursors between
853+
threads. If you still try to do so, you will get an exception at runtime.
854+
855+
The only exception is calling the :meth:`~Connection.interrupt` method, which
856+
only makes sense to call from a different thread.
857+

0 commit comments

Comments
 (0)