@@ -53,12 +53,7 @@ namespace vix::executor
5353 * @param config Runtime configuration used to create the underlying runtime.
5454 */
5555 explicit RuntimeExecutor (
56- const vix::runtime::RuntimeConfig &config = vix::runtime::RuntimeConfig{})
57- : runtime_(std::make_unique<vix::runtime::Runtime>(config)),
58- state_(std::make_shared<SharedState>()),
59- started_(false )
60- {
61- }
56+ const vix::runtime::RuntimeConfig &config = vix::runtime::RuntimeConfig{});
6257
6358 /* *
6459 * @brief Construct a RuntimeExecutor with an explicit worker count.
@@ -68,10 +63,7 @@ namespace vix::executor
6863 *
6964 * @param workers Number of runtime workers to use.
7065 */
71- explicit RuntimeExecutor (std::uint32_t workers)
72- : RuntimeExecutor(make_config_from_workers(workers))
73- {
74- }
66+ explicit RuntimeExecutor (std::uint32_t workers);
7567
7668 /* *
7769 * @brief Construct a RuntimeExecutor from an existing runtime instance.
@@ -80,16 +72,7 @@ namespace vix::executor
8072 *
8173 * @throw std::invalid_argument If runtime is null.
8274 */
83- explicit RuntimeExecutor (std::unique_ptr<vix::runtime::Runtime> runtime)
84- : runtime_(std::move(runtime)),
85- state_(std::make_shared<SharedState>()),
86- started_(false )
87- {
88- if (!runtime_)
89- {
90- throw std::invalid_argument (" RuntimeExecutor requires a valid runtime" );
91- }
92- }
75+ explicit RuntimeExecutor (std::unique_ptr<vix::runtime::Runtime> runtime);
9376
9477 RuntimeExecutor (const RuntimeExecutor &) = delete ;
9578 RuntimeExecutor &operator =(const RuntimeExecutor &) = delete ;
@@ -100,16 +83,7 @@ namespace vix::executor
10083 /* *
10184 * @brief Destroy the executor and stop the runtime safely.
10285 */
103- ~RuntimeExecutor () noexcept
104- {
105- try
106- {
107- stop ();
108- }
109- catch (...)
110- {
111- }
112- }
86+ ~RuntimeExecutor () noexcept ;
11387
11488 /* *
11589 * @brief Start the underlying runtime once.
0 commit comments