Merge branch 'blender-v2.83-release'

This commit is contained in:
Brecht Van Lommel 2020-05-20 00:46:15 +02:00
commit 33fc42bd65
1 changed files with 3 additions and 0 deletions

View File

@ -115,6 +115,8 @@ void BLI_task_parallel_range(const int start,
#ifdef WITH_TBB
/* Multithreading. */
if (settings->use_threading && BLI_task_scheduler_num_threads() > 1) {
BLI_threaded_malloc_begin();
RangeTask task(func, userdata, settings);
const size_t grainsize = MAX2(settings->min_iter_per_thread, 1);
const tbb::blocked_range<int> range(start, stop, grainsize);
@ -129,6 +131,7 @@ void BLI_task_parallel_range(const int start,
parallel_for(range, task);
}
BLI_threaded_malloc_end();
return;
}
#endif