cable-monitor: remove use of 'detail' then algorithm
Anything marked "detail" is not intended to be used outside of
the library providing it. Eliminate this use of the `then` algorithm
from stdexec. Without this change, it is preventing the use of
non-vendored stdexec from sdbusplus[1].
[1]: https://gerrit.openbmc.org/c/openbmc/sdbusplus/+/85063
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I1603db9841afc63e8696db0eff2a890a68d7d78f
diff --git a/src/cable-monitor/CableMonitor.cpp b/src/cable-monitor/CableMonitor.cpp
index f57a722..2812e7f 100644
--- a/src/cable-monitor/CableMonitor.cpp
+++ b/src/cable-monitor/CableMonitor.cpp
@@ -4,7 +4,6 @@
#include <phosphor-logging/lg2.hpp>
#include <sdbusplus/async.hpp>
-#include <sdbusplus/async/stdexec/__detail/__then.hpp>
#include <sdbusplus/message/native_types.hpp>
#include <sdbusplus/server/manager.hpp>
@@ -70,8 +69,10 @@
co_return;
}
co_await entityManager.handleInventoryGet();
- ctx.spawn(sdbusplus::async::sleep_for(ctx, std::chrono::seconds(5)) |
- stdexec::then([&]() { reconcileCableData(); }));
+ ctx.spawn([](auto& self) -> sdbusplus::async::task<> {
+ co_await sdbusplus::async::sleep_for(self.ctx, std::chrono::seconds(5));
+ self.reconcileCableData();
+ }(*this));
}
auto Monitor::start() -> sdbusplus::async::task<>