summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerhard Häring <gh@ghaering.de>2010-08-06 06:12:05 (GMT)
committerGerhard Häring <gh@ghaering.de>2010-08-06 06:12:05 (GMT)
commitc34d76cdc3212615f9a3c2c4b1c542592372b5f8 (patch)
tree11b8642b6f2e2f82f0599c6344bb84029681e2c9
parentf045d775fd900a4cc4da027e37a50ab984d18ce7 (diff)
downloadcpython-c34d76cdc3212615f9a3c2c4b1c542592372b5f8.zip
cpython-c34d76cdc3212615f9a3c2c4b1c542592372b5f8.tar.gz
cpython-c34d76cdc3212615f9a3c2c4b1c542592372b5f8.tar.bz2
Issue #3854: Documented using the sqlite3 module with multiple threads.
-rw-r--r--Doc/library/sqlite3.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 89fa58e..d4f2123 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -867,3 +867,18 @@ exception, the transaction is rolled back; otherwise, the transaction is
committed:
.. literalinclude:: ../includes/sqlite3/ctx_manager.py
+
+
+Common issues
+-------------
+
+Multithreading
+^^^^^^^^^^^^^^
+
+Older SQLite versions had issues with sharing connections between threads.
+That's why the Python module disallows sharing connections and cursors between
+threads. If you still try to do so, you will get an exception at runtime.
+
+The only exception is calling the :meth:`~Connection.interrupt` method, which
+only makes sense to call from a different thread.
+