From e8b7e99b455235815c6b54c13dbc61e864575395 Mon Sep 17 00:00:00 2001 From: chatlanin Date: Tue, 21 Mar 2023 14:24:04 +0300 Subject: [PATCH] united thread to parallel --- src/try_engine/event/app_event/event.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/try_engine/event/app_event/event.hpp b/src/try_engine/event/app_event/event.hpp index 98aa03f..154fef0 100644 --- a/src/try_engine/event/app_event/event.hpp +++ b/src/try_engine/event/app_event/event.hpp @@ -30,7 +30,14 @@ namespace try_engine::app_event tbb::parallel_for(tbb::blocked_range(0, l_stack.size()), [&](tbb::blocked_range r) { for (int i = r.begin(); i < r.end(); ++i) - l_stack[i]->on_event(type, value); + { + std::thread th { + [&]() { + l_stack[i]->on_event(type, value); + } + }; + th.detach(); + } }); }