From: Gerhard Häring Date: Fri, 6 Aug 2010 06:14:12 +0000 (+0000) Subject: Issue #3854: Documented using the sqlite3 module with multiple threads. X-Git-Tag: v2.7.1rc1~458 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f5c15fa997bbdb88ddaaed93f8ee5420d09f543;p=thirdparty%2FPython%2Fcpython.git Issue #3854: Documented using the sqlite3 module with multiple threads. --- diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 439ca2306989..cf38373ab8d0 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -880,3 +880,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. +