Skip to content

Commit

Permalink
Format new code
Browse files Browse the repository at this point in the history
  • Loading branch information
David Eles committed Jan 7, 2025
1 parent 2b5bb9e commit 1663fc6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/exec/test_static_thread_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
#include <unordered_set>
namespace ex = stdexec;

TEST_CASE("static_thread_pool::get_scheduler_on_thread Test start on a specific thread", "[types][static_thread_pool]")
{
TEST_CASE(
"static_thread_pool::get_scheduler_on_thread Test start on a specific thread",
"[types][static_thread_pool]") {
constexpr const size_t num_of_threads = 5;
exec::static_thread_pool pool {num_of_threads};
exec::static_thread_pool pool{num_of_threads};

std::unordered_set<std::thread::id> thread_ids;
for(size_t i = 0; i < num_of_threads; ++i)
{
for (size_t i = 0; i < num_of_threads; ++i) {
auto sender = ex::schedule(pool.get_scheduler_on_thread(i))
| ex::then([&]{thread_ids.insert(std::this_thread::get_id());});
| ex::then([&] { thread_ids.insert(std::this_thread::get_id()); });
ex::sync_wait(std::move(sender));
}
REQUIRE(thread_ids.size() == num_of_threads);
Expand Down

0 comments on commit 1663fc6

Please sign in to comment.