united thread to parallel

This commit is contained in:
chatlanin 2023-03-21 14:24:04 +03:00
parent 45e964a8fb
commit e8b7e99b45

View File

@ -30,7 +30,14 @@ namespace try_engine::app_event
tbb::parallel_for(tbb::blocked_range<int>(0, l_stack.size()), [&](tbb::blocked_range<int> r) { tbb::parallel_for(tbb::blocked_range<int>(0, l_stack.size()), [&](tbb::blocked_range<int> r) {
for (int i = r.begin(); i < r.end(); ++i) 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();
}
}); });
} }