@@ -74,7 +74,9 @@ template <typename Function, typename... Args>
7474template <typename Function, typename ... Args>
7575[[nodiscard]] auto Async (engine::TaskProcessor& task_processor, std::string name, Function&& f, Args&&... args) {
7676 return engine::impl::MakeTaskWithResult<engine::TaskWithResult>(
77- engine::impl::TaskConfig{.task_processor = &task_processor},
77+ engine::impl::TaskConfig{
78+ .task_processor = &task_processor,
79+ },
7880 utils::impl::SpanLazyPrvalue (std::move (name)),
7981 std::forward<Function>(f),
8082 std::forward<Args>(args)...
@@ -98,11 +100,7 @@ template <typename Function, typename... Args>
98100[[nodiscard]] auto AsyncHideSpan (Function&& f, Args&&... args) {
99101 return engine::impl::MakeTaskWithResult<engine::TaskWithResult>(
100102 engine::impl::TaskConfig{},
101- utils::impl::SpanLazyPrvalue (
102- std::string{},
103- utils::impl::SpanWrapCall::InheritVariables::kYes ,
104- utils::impl::SpanWrapCall::HideSpan::kYes
105- ),
103+ utils::impl::SpanLazyPrvalue (std::string{}, utils::impl::SpanWrapCall::HideSpan::kYes ),
106104 std::forward<Function>(f),
107105 std::forward<Args>(args)...
108106 );
@@ -125,12 +123,10 @@ template <typename Function, typename... Args>
125123template <typename Function, typename ... Args>
126124[[nodiscard]] auto AsyncHideSpan (engine::TaskProcessor& task_processor, Function&& f, Args&&... args) {
127125 return engine::impl::MakeTaskWithResult<engine::TaskWithResult>(
128- engine::impl::TaskConfig{.task_processor = &task_processor},
129- utils::impl::SpanLazyPrvalue (
130- std::string{},
131- utils::impl::SpanWrapCall::InheritVariables::kYes ,
132- utils::impl::SpanWrapCall::HideSpan::kYes
133- ),
126+ engine::impl::TaskConfig{
127+ .task_processor = &task_processor,
128+ },
129+ utils::impl::SpanLazyPrvalue (std::string{}, utils::impl::SpanWrapCall::HideSpan::kYes ),
134130 std::forward<Function>(f),
135131 std::forward<Args>(args)...
136132 );
@@ -179,7 +175,9 @@ template <typename Function, typename... Args>
179175template <typename Function, typename ... Args>
180176[[nodiscard]] auto SharedAsync (engine::TaskProcessor& task_processor, std::string name, Function&& f, Args&&... args) {
181177 return engine::impl::MakeTaskWithResult<engine::SharedTaskWithResult>(
182- engine::impl::TaskConfig{.task_processor = &task_processor},
178+ engine::impl::TaskConfig{
179+ .task_processor = &task_processor,
180+ },
183181 utils::impl::SpanLazyPrvalue (std::move (name)),
184182 std::forward<Function>(f),
185183 std::forward<Args>(args)...
@@ -199,7 +197,9 @@ template <typename Function, typename... Args>
199197template <typename Function, typename ... Args>
200198[[nodiscard]] auto CriticalAsync (std::string name, Function&& f, Args&&... args) {
201199 return engine::impl::MakeTaskWithResult<engine::TaskWithResult>(
202- engine::impl::TaskConfig{.importance = engine::Task::Importance::kCritical },
200+ engine::impl::TaskConfig{
201+ .importance = engine::Task::Importance::kCritical ,
202+ },
203203 utils::impl::SpanLazyPrvalue (std::move (name)),
204204 std::forward<Function>(f),
205205 std::forward<Args>(args)...
@@ -219,7 +219,9 @@ template <typename Function, typename... Args>
219219template <typename Function, typename ... Args>
220220[[nodiscard]] auto SharedCriticalAsync (std::string name, Function&& f, Args&&... args) {
221221 return engine::impl::MakeTaskWithResult<engine::SharedTaskWithResult>(
222- engine::impl::TaskConfig{.importance = engine::Task::Importance::kCritical },
222+ engine::impl::TaskConfig{
223+ .importance = engine::Task::Importance::kCritical ,
224+ },
223225 utils::impl::SpanLazyPrvalue (std::move (name)),
224226 std::forward<Function>(f),
225227 std::forward<Args>(args)...
@@ -260,7 +262,9 @@ template <typename Function, typename... Args>
260262template <typename Function, typename ... Args>
261263[[nodiscard]] auto Async (std::string name, engine::Deadline deadline, Function&& f, Args&&... args) {
262264 return engine::impl::MakeTaskWithResult<engine::TaskWithResult>(
263- engine::impl::TaskConfig{.deadline = deadline},
265+ engine::impl::TaskConfig{
266+ .deadline = deadline,
267+ },
264268 utils::impl::SpanLazyPrvalue (std::move (name)),
265269 std::forward<Function>(f),
266270 std::forward<Args>(args)...
@@ -305,12 +309,11 @@ template <typename Function, typename... Args>
305309 Args&&... args
306310) {
307311 return engine::impl::MakeTaskWithResult<engine::TaskWithResult>(
308- engine::impl::TaskConfig{.task_processor = &task_processor},
309- utils::impl::SpanLazyPrvalue (
310- std::move (name),
311- utils::impl::SpanWrapCall::InheritVariables::kNo ,
312- utils::impl::SpanWrapCall::HideSpan::kNo
313- ),
312+ engine::impl::TaskConfig{
313+ .task_processor = &task_processor,
314+ .inherited_variables_priority = engine::TaskInheritedVariablePriority::kBackground ,
315+ },
316+ utils::impl::SpanLazyPrvalue (std::move (name)),
314317 std::forward<Function>(f),
315318 std::forward<Args>(args)...
316319 );
@@ -340,12 +343,9 @@ template <typename Function, typename... Args>
340343 engine::impl::TaskConfig{
341344 .task_processor = &task_processor,
342345 .importance = engine::Task::Importance::kCritical ,
346+ .inherited_variables_priority = engine::TaskInheritedVariablePriority::kBackground ,
343347 },
344- utils::impl::SpanLazyPrvalue (
345- std::move (name),
346- utils::impl::SpanWrapCall::InheritVariables::kNo ,
347- utils::impl::SpanWrapCall::HideSpan::kNo
348- ),
348+ utils::impl::SpanLazyPrvalue (std::move (name)),
349349 std::forward<Function>(f),
350350 std::forward<Args>(args)...
351351 );
0 commit comments