mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-11 07:03:33 +02:00
Remove Timer.cpp/h. Move various collections into Common/Data/Collections.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#include "ThreadPools.h"
|
||||
|
||||
#include "../Core/Config.h"
|
||||
#include "Common/MakeUnique.h"
|
||||
|
||||
std::unique_ptr<ThreadPool> GlobalThreadPool::pool;
|
||||
std::once_flag GlobalThreadPool::init_flag;
|
||||
|
||||
void GlobalThreadPool::Loop(const std::function<void(int,int)>& loop, int lower, int upper) {
|
||||
std::call_once(init_flag, Inititialize);
|
||||
pool->ParallelLoop(loop, lower, upper);
|
||||
}
|
||||
|
||||
void GlobalThreadPool::Inititialize() {
|
||||
pool = make_unique<ThreadPool>(g_Config.iNumWorkerThreads);
|
||||
}
|
||||
Reference in New Issue
Block a user