0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 08:41:02 +08:00

small refactoring

This commit is contained in:
Victor Zarubkin 2016-09-13 23:03:16 +03:00
parent 1b33ad788d
commit bf02f32482

View File

@ -191,7 +191,6 @@ int main(int argc, char* argv[])
EASY_MAIN_THREAD; EASY_MAIN_THREAD;
std::vector<std::thread> threads; std::vector<std::thread> threads;
std::thread render = std::thread(renderThread); std::thread render = std::thread(renderThread);
std::thread modelling = std::thread(modellingThread); std::thread modelling = std::thread(modellingThread);
@ -201,10 +200,10 @@ int main(int argc, char* argv[])
threads.emplace_back(std::thread(renderThread)); threads.emplace_back(std::thread(renderThread));
threads.emplace_back(std::thread(modellingThread)); threads.emplace_back(std::thread(modellingThread));
} }
{
std::lock_guard<std::mutex> lk(cv_m); cv_m.lock();
g_i = 1; g_i = 1;
} cv_m.unlock();
cv.notify_all(); cv.notify_all();
for (int i = 0; i < RENDER_STEPS; ++i) { for (int i = 0; i < RENDER_STEPS; ++i) {
@ -214,9 +213,8 @@ int main(int argc, char* argv[])
render.join(); render.join();
modelling.join(); modelling.join();
for(auto& t : threads){ for(auto& t : threads)
t.join(); t.join();
}
/**/ /**/
auto end = std::chrono::system_clock::now(); auto end = std::chrono::system_clock::now();