Disable worker threads when SQLITE_THREADSAFE=0. Set the default compile-time

maximum number of worker threads to 8 and honor the
SQLITE_DEFAULT_WORKER_THREADS compile-time constant (which defaults to 0).

FossilOrigin-Name: 33fa0410499900dd8beb44b9a8ffbd9f4b68c8d8
This commit is contained in:
drh
2014-08-29 19:06:07 +00:00
parent 43cbe14378
commit 6b2129aaaf
4 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -439,12 +439,12 @@
** SQLITE_TEMP_STORE is set to 3 (never use temporary files), set it
** to zero.
*/
#if SQLITE_TEMP_STORE==3
#if SQLITE_TEMP_STORE==3 || SQLITE_THREADSAFE==0
# undef SQLITE_MAX_WORKER_THREADS
# define SQLITE_MAX_WORKER_THREADS 0
#endif
#ifndef SQLITE_MAX_WORKER_THREADS
# define SQLITE_MAX_WORKER_THREADS 4
# define SQLITE_MAX_WORKER_THREADS 8
#endif
#ifndef SQLITE_DEFAULT_WORKER_THREADS
# define SQLITE_DEFAULT_WORKER_THREADS 0