async: context: clean up TODO
The latest version of stdexec cleans up an issue we were seeing
that was marked with a TODO. Switch from a complicated task
structure back to the simple `task<>`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ibe2a73b1e7d172f829308a12c88749db43354e83
diff --git a/src/async/context.cpp b/src/async/context.cpp
index b324c6c..8ddbe58 100644
--- a/src/async/context.cpp
+++ b/src/async/context.cpp
@@ -38,10 +38,7 @@
// Data to share with the worker.
event_t::time_resolution timeout{};
- // TODO: It seems like we should be able to do a normal `task<>` here
- // but spawn on it compile fails.
- static exec::basic_task<void, exec::__task::__raw_task_context<void>>
- loop(context& ctx);
+ static auto loop(context& ctx) -> task<>;
static void wait_once(context& ctx);
};
@@ -100,8 +97,7 @@
}
};
-exec::basic_task<void, exec::__task::__raw_task_context<void>>
- wait_process_completion::loop(context& ctx)
+auto wait_process_completion::loop(context& ctx) -> task<>
{
while (!ctx.final_stop.stop_requested())
{