Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
14 Views

tbb::this_task_arena::isolate() & tbb::parallel_for()

Hi.

I read the document but I have one quesition.

Is it valid to always use tbb::this_task_arena::isolate() outside tbb::parallel_for()?
Rarely, deadlock occurs in the outer tbb::parallel_for().

tbb::this_task_arena::isolate([&]()
        {
            tbb::parallel_for(0, N1, [&](int i) // cause deadlock on here
                {
                    tbb::this_task_arena::isolate([&]()
                        {
                            tbb::parallel_for(0, N2, [](int j) { });
                        }
                    );
                })
        });

Thanks

0 Kudos
0 Replies