MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / Initialize

Method Initialize

TombEngine/Specific/Parallel.cpp:60–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 }
59
60 void ParallelTaskManager::Initialize()
61 {
62 // Reserve threads.
63 unsigned int threadCount = g_GameFlow->GetSettings()->System.Multithreaded ? (GetCoreCount() * 2) : 1;
64 _threads.reserve(threadCount);
65
66 // Create threads.
67 for (int i = 0; i < threadCount; i++)
68 _threads.push_back(std::thread(&ParallelTaskManager::Worker, this));
69 }
70
71 std::future<void> ParallelTaskManager::AddTask(const ParallelTask& task)
72 {

Callers 2

WinMainFunction · 0.45
LoadObjectsFunction · 0.45

Calls 3

GetSettingsMethod · 0.80
reserveMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected