add BT_SetTerminate to all threads

This commit is contained in:
2020-04-24 07:38:28 +02:00
parent 4a1df278d1
commit f041559212
6 changed files with 7 additions and 0 deletions

View File

@@ -706,6 +706,7 @@ void parallel_for(size_t nb_elements, std::function<void(size_t i)> functor, boo
{
size_t start = i * batch_size;
my_threads[i] = std::thread([functor, start, batch_size]() {
BT_SetTerminate();
for (size_t j = start; j < start + batch_size; j++)
functor(j);
});