fixed and improved thread mode set/test

fixed and improved threading mode setting and testing/benchmarking
This commit is contained in:
aleks-f
2012-12-23 15:27:32 -06:00
parent 50b67d711f
commit ba70e7f734
4 changed files with 60 additions and 18 deletions

View File

@@ -97,16 +97,24 @@ public:
/// Returns true if succesful
static bool isThreadSafe();
/// Returns true if SQLite was compiled in thread or serialized mode.
/// Returns true if SQLite was compiled in multi-thread or serialized mode.
/// See http://www.sqlite.org/c3ref/threadsafe.html for details.
///
/// Returns true if succesful
static bool setThreadMode(int mode);
/// Sets the threading mode to single, multi or serialized.
/// See http://www.sqlite.org/threadsafe.html for details.
///
/// Returns true if succesful
static int getThreadMode();
/// Returns the thread mode.
private:
static TypeMap _types;
Poco::FastMutex _mutex;
static int _threadMode;
};