diff options
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp index d6d9a368f0..d1270348e0 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -86,6 +86,8 @@ void locking_callback(int mode, int i, const char* file, int line) } } +LockedPageManager LockedPageManager::instance; + // Init class CInit { @@ -1297,3 +1299,15 @@ void RenameThread(const char* name) (void)name; #endif } + +bool NewThread(void(*pfn)(void*), void* parg) +{ + try + { + boost::thread(pfn, parg); // thread detaches when out of scope + } catch(boost::thread_resource_error &e) { + printf("Error creating thread: %s\n", e.what()); + return false; + } + return true; +} |