Core: Init memory on multiple threads.

Also init volatile at the same time for consistency.
This commit is contained in:
Unknown W. Brackets committed 2021-04-16 00:53:50 -07:00
1 parent 6ee944a0a6
commit 4f96169357
6 files changed
+18 -12

No files matched your search

+5
View File
@@ -16,6 +16,11 @@ void GlobalThreadPool::Memcpy(void *dest, const void *src, int size) {
pool->ParallelMemcpy(dest, src, size);
}
void GlobalThreadPool::Memset(void *dest, uint8_t val, int size) {
std::call_once(init_flag, Inititialize);
pool->ParallelMemset(dest, val, size);
}
void GlobalThreadPool::Inititialize() {
pool = make_unique<ThreadPool>(g_Config.iNumWorkerThreads);
}