Skip to content

Commit 3f2713e

Browse files
committed
Fix datarace in test.
1 parent 9dc02d1 commit 3f2713e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/exec/test_system_context.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ TEST_CASE("simple bulk_unchunked task on system context", "[types][system_schedu
236236
}
237237

238238
TEST_CASE("bulk_chunked on parallel_scheduler performs chunking", "[types][system_scheduler]") {
239-
bool has_chunking = false;
239+
std::atomic<bool> has_chunking = false;
240240

241241
exec::parallel_scheduler sched = exec::get_parallel_scheduler();
242242
auto bulk_snd =
@@ -247,7 +247,7 @@ TEST_CASE("bulk_chunked on parallel_scheduler performs chunking", "[types][syste
247247
});
248248
ex::sync_wait(std::move(bulk_snd));
249249

250-
REQUIRE(has_chunking);
250+
REQUIRE(has_chunking.load());
251251
}
252252

253253
TEST_CASE(

0 commit comments

Comments
 (0)