diff --git a/src/try_engine/event/app_event/event.hpp b/src/try_engine/event/app_event/event.hpp index 4857903..98aa03f 100644 --- a/src/try_engine/event/app_event/event.hpp +++ b/src/try_engine/event/app_event/event.hpp @@ -18,20 +18,20 @@ namespace try_engine::app_event void execute(std::any type, std::any value) { - for (const auto layer : l_stack) - { - std::thread th { - [=]() { - layer->on_event(type, value); - } - }; - th.detach(); - } + // for (const auto layer : l_stack) + // { + // std::thread th { + // [=]() { + // layer->on_event(type, value); + // } + // }; + // th.detach(); + // } - // 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); - // }); + 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); + }); } void print_size();