Skip to content

Commit

Permalink
tests: arena should not be static
Browse files Browse the repository at this point in the history
There are two reasons why arena should not be static:
1. For different threading context parameters we need to create
   different arenas
2. No arena instances should exist at the time of finalize call
  • Loading branch information
densamoilov committed Jan 20, 2023
1 parent f05013d commit bd0389d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_thread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@ struct params_pack_helper_t<0, R> {
size_t core_type_id = (size_t)ctx.core_type < core_types.size() \
? ctx.core_type \
: core_types.size() - 1; \
static auto core_type = ctx.core_type == tbb::task_arena::automatic \
auto core_type = ctx.core_type == tbb::task_arena::automatic \
? tbb::task_arena::automatic \
: core_types[core_type_id]; \
static auto arena = tbb::task_arena { \
auto arena = tbb::task_arena { \
tbb::task_arena::constraints {} \
.set_core_type(core_type) \
.set_max_threads_per_core(ctx.nthr_per_core) \
Expand Down

0 comments on commit bd0389d

Please sign in to comment.