Avoid name collision with ThreadPool on Windows hosts. Fixes all Linux/Unix cross-compiles from Windows, including Harmattan and Blackberry.

This commit is contained in:
Sacha committed 2013-05-03 16:31:53 +10:00
1 parent 2396574f45
commit 8cb0423f32
9 files changed
+12 -17

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
#include "ThreadPools.h"
#include "../Core/Config.h"
shared_ptr<ThreadPool> GlobalThreadPool::pool;
bool GlobalThreadPool::initialized = false;
void GlobalThreadPool::Loop(const function<void(int,int)>& loop, int lower, int upper) {
Inititialize();
pool->ParallelLoop(loop, lower, upper);
}
void GlobalThreadPool::Inititialize() {
if(!initialized) {
pool = std::make_shared<ThreadPool>(g_Config.iNumWorkerThreads);
initialized = true;
}
}