This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Windows SQLite DLL should be built with multithreading enabled
Type: enhancement Stage:
Components: Build, Windows Versions: Python 3.0, Python 2.6
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: loewis Nosy List: amaury.forgeotdarc, ghaering, loewis
Priority: high Keywords: easy

Created on 2008-09-12 22:45 by ghaering, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg73148 - (view) Author: Gerhard Häring (ghaering) * (Python committer) Date: 2008-09-12 22:45
According to http://www.sqlite.org/faq.html#q6 SQLite should be built
with SQLITE_THREADSAFE defined when the library is used in a
multithreaded context.

This doesn't mean that the connection objects can then be shared between
threads. This they cannot. But that if the SQLite API is used from more
than one thread, then the library must be built with the
SQLITE_THREADSAFE option.
msg73179 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-09-13 12:47
It seems that it is already the case. On Windows, a one-big-source-file
version of sqlite is used, fetched from
http://svn.python.org/projects/external/sqlite-3.5.9 
(see Tools/buildbot/external-common.bat)

and in this file, SQLITE_THREADSAFE is always set to 1, unless you
explicitely compile with "THREADSAFE=0".
msg73394 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-09-18 18:21
I agree with Amaury's analysis (except that the preferred way to
override it is to define SQLITE_THREADSAFE directly). If it's not
defined, it defaults to 1.

Closing as works-for-me.
History
Date User Action Args
2022-04-11 14:56:39adminsetgithub: 48103
2008-09-18 18:21:34loewissetstatus: open -> closed
resolution: works for me
messages: + msg73394
2008-09-13 12:47:55amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg73179
2008-09-12 22:45:52ghaeringcreate