]> granicus.if.org Git - python/commitdiff
Issue #3854: Documented using the sqlite3 module with multiple threads.
authorGerhard Häring <gh@ghaering.de>
Fri, 6 Aug 2010 06:13:25 +0000 (06:13 +0000)
committerGerhard Häring <gh@ghaering.de>
Fri, 6 Aug 2010 06:13:25 +0000 (06:13 +0000)
Doc/library/sqlite3.rst

index 668fc64cdd4369ef291a6e780ddb197ba393bfd1..d542cbb4e206a7df3c777f09c43d3ff1be13a1fc 100644 (file)
@@ -840,3 +840,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.
+