mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-26 19:58:36 +01:00
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:
1 parent
2396574f45
commit
8cb0423f32
9 files changed
+12
-17
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user