From 0212e53b14e427d3c3e009b8fd4a65e9312bae1b Mon Sep 17 00:00:00 2001 From: "Isaev, Ilya" Date: Tue, 3 Dec 2024 10:53:10 +0100 Subject: [PATCH] Add more comments, remove redundant whitespace Signed-off-by: Isaev, Ilya --- rfcs/proposed/parallel_block_for_task_arena/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rfcs/proposed/parallel_block_for_task_arena/README.md b/rfcs/proposed/parallel_block_for_task_arena/README.md index d1eff534b8..6e702b5939 100644 --- a/rfcs/proposed/parallel_block_for_task_arena/README.md +++ b/rfcs/proposed/parallel_block_for_task_arena/README.md @@ -214,17 +214,22 @@ void parallel_phase_example() { void scoped_parallel_phase_example() { tbb::task_arena ta{/*arena constraints*/}; { + // Start of the parallel phase tbb::task_arena::scoped_parallel_phase phase{ta, /*with_fast_leave=*/true}; ta.execute([]() { // Parallel computation }); - // Serial computation + // Serial computation ta.execute([]() { // Parallel computation }); } // End of the parallel phase + + // Different parallel runtime (for example, OpenMP) is used + // so it is preferred that worker threads won't be retained + // in the arena at this point. #pragma omp parallel for for (int i = 0; i < work_size; ++i) { // Computation