diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-12-19 16:06:16 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-12-20 05:10:52 +0000 |
commit | a00e560b0d8267e9b376e5c0e6a2139a7be63281 (patch) | |
tree | ba207915b8cac9fb92493cc103821f6cce9db31b /vespalib/src/tests/coro | |
parent | 05b58ac83b06b00ae97ecafad101e44d4dd76aee (diff) |
Remove stacksize from the thread pools and thread executors.
Diffstat (limited to 'vespalib/src/tests/coro')
-rw-r--r-- | vespalib/src/tests/coro/lazy/lazy_test.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/vespalib/src/tests/coro/lazy/lazy_test.cpp b/vespalib/src/tests/coro/lazy/lazy_test.cpp index 29aac4440fc..f6767873957 100644 --- a/vespalib/src/tests/coro/lazy/lazy_test.cpp +++ b/vespalib/src/tests/coro/lazy/lazy_test.cpp @@ -3,7 +3,6 @@ #include <vespa/vespalib/coro/lazy.h> #include <vespa/vespalib/coro/completion.h> #include <vespa/vespalib/coro/schedule.h> -#include <vespa/vespalib/util/size_literals.h> #include <vespa/vespalib/util/require.h> #include <vespa/vespalib/util/gate.h> #include <vespa/vespalib/util/threadstackexecutor.h> @@ -102,7 +101,7 @@ TEST(LazyTest, extract_rvalue_from_lazy_in_sync_wait) { } TEST(LazyTest, calculate_result_in_another_thread) { - vespalib::ThreadStackExecutor executor(1, 128_Ki); + vespalib::ThreadStackExecutor executor(1); auto result = sync_wait(try_schedule_on(executor, make_lazy(7))); EXPECT_EQ(result.first, true); EXPECT_EQ(result.second, 7); @@ -111,13 +110,13 @@ TEST(LazyTest, calculate_result_in_another_thread) { } TEST(LazyTest, exceptions_are_propagated) { - vespalib::ThreadStackExecutor executor(1, 128_Ki); + vespalib::ThreadStackExecutor executor(1); auto lazy = try_schedule_on(executor, forward_value(will_throw())); EXPECT_THROW(sync_wait(std::move(lazy)), vespalib::RequireFailedException); } TEST(LazyTest, not_able_to_switch_thread_if_executor_is_shut_down) { - vespalib::ThreadStackExecutor executor(1, 128_Ki); + vespalib::ThreadStackExecutor executor(1); executor.shutdown(); auto result = sync_wait(try_schedule_on(executor, make_lazy(7))); EXPECT_EQ(result.first, false); @@ -129,7 +128,7 @@ TEST(LazyTest, not_able_to_switch_thread_if_executor_is_shut_down) { TEST(LazyTest, async_wait_with_lambda) { Gate gate; Received<int> result; - vespalib::ThreadStackExecutor executor(1, 128_Ki); + vespalib::ThreadStackExecutor executor(1); auto lazy = schedule_on(executor, make_lazy(7)); async_wait(std::move(lazy), [&](auto res) { @@ -143,7 +142,7 @@ TEST(LazyTest, async_wait_with_lambda) { TEST(LazyTest, async_wait_with_error) { Gate gate; Received<int> result; - vespalib::ThreadStackExecutor executor(1, 128_Ki); + vespalib::ThreadStackExecutor executor(1); auto lazy = schedule_on(executor, will_throw()); async_wait(std::move(lazy), [&](auto res) { @@ -157,7 +156,7 @@ TEST(LazyTest, async_wait_with_error) { TEST(LazyTest, async_wait_with_move_only_result) { Gate gate; Received<std::unique_ptr<int>> result; - vespalib::ThreadStackExecutor executor(1, 128_Ki); + vespalib::ThreadStackExecutor executor(1); auto lazy = schedule_on(executor, move_only_int()); async_wait(std::move(lazy), [&](auto res) { @@ -178,7 +177,7 @@ struct Refs { TEST(LazyTest, async_wait_with_move_only_result_and_move_only_lambda) { Gate gate; Received<std::unique_ptr<int>> result; - vespalib::ThreadStackExecutor executor(1, 128_Ki); + vespalib::ThreadStackExecutor executor(1); auto lazy = schedule_on(executor, move_only_int()); async_wait(std::move(lazy), [refs = std::make_unique<Refs>(gate,result)](auto res) { |