-
-
Notifications
You must be signed in to change notification settings - Fork 341
Closed
Labels
Description
Is it threadsafe to use a single storage object globally?
I'm using this wrapper in our app. Initially I used thread_local storage object but I occasionally encounter bug which go down to libstdc++ share_ptr trigger segfault(which is quite unlikely a libstdc++ bug). Then I try to build with SQLITE_THREADSAFE=1 and switch to use magic static(global) storage object. One weird error happen, "can not open database file". Then I removed the old file, yet the second error happen, SQL logic error.
I write my own wrapper around the storage object and initialize then sync the scheme in the ctor of the wrapper. Can you please clarify whether the storage object is threadsafe?
fnc12