I'd like to use sqlite3_enable_shared_cache in
my APSW wrapper but I can't see a sensible
safe way of doing it. The wrapper already enforces the conditions mentioned in the doc (all operations on a handle happening in the same thread).

It looks like I'd have to do a lot of housekeeping
calling sqlite3_enable_shared_cache just before the
first sqlite3_open in a thread and just after the
last sqlite3_close.

Is SQLite already tracking these?  Why can't I
call enable on every sqlite3_open and have it
just succeed if sharing is already setup?

Will the last sqlite3_close not clean up the
shared cache anyway?

Roger

Reply via email to