diff --git a/libs/core/executors/include/hpx/executors/detail/index_queue_spawning.hpp b/libs/core/executors/include/hpx/executors/detail/index_queue_spawning.hpp index c514f8abb227..e1a94f72ff34 100644 --- a/libs/core/executors/include/hpx/executors/detail/index_queue_spawning.hpp +++ b/libs/core/executors/include/hpx/executors/detail/index_queue_spawning.hpp @@ -576,7 +576,7 @@ namespace hpx::parallel::execution::detail { auto post_policy = hpx::execution::experimental::with_stacksize( policy, threads::thread_stacksize::small_); std::size_t start = 0; - while (true) + while (start < size) { auto const stop = start + hierarchical_threshold; if (stop > size)