Nursery: Initial integration
StimulusProducer: syncAwaitAllSettlements should pump caller io_context
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
#ifndef DEVICEREATTACHER_H
|
||||
#define DEVICEREATTACHER_H
|
||||
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#include <exception>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <boost/asio/deadline_timer.hpp>
|
||||
#include <marionette/marionetteThread.h>
|
||||
#include <spinscale/co/dynamicPostingInvoker.h>
|
||||
#include <spinscale/co/nonViralTaskNursery.h>
|
||||
#include <spinscale/co/postTarget.h>
|
||||
#include <spinscale/syncCancelerForAsyncWork.h>
|
||||
|
||||
namespace smo {
|
||||
@@ -32,23 +30,17 @@ public:
|
||||
void stop();
|
||||
|
||||
private:
|
||||
void scheduleNextTimeout();
|
||||
void onTimeout(const boost::system::error_code& error);
|
||||
void holdReattachCReq();
|
||||
|
||||
mrntt::MrnttNonViralNonPostingInvoker reattachKnownListCReq(
|
||||
sscl::co::DynamicNonViralPostingInvoker deviceReattacherCDaemon(
|
||||
sscl::co::ExplicitPostTarget postTarget,
|
||||
std::exception_ptr &exceptionPtr,
|
||||
std::function<void()> callback);
|
||||
std::function<void()> callback,
|
||||
sscl::SyncCancelerForAsyncWork &canceler);
|
||||
|
||||
DeviceManager &parent;
|
||||
// io_context thread for timer and non-posting reattach shell (see ctor).
|
||||
// io_context thread for timer (see ctor).
|
||||
std::shared_ptr<sscl::ComponentThread> ioThread;
|
||||
sscl::SyncCancelerForAsyncWork deviceReattacherCanceler;
|
||||
boost::asio::deadline_timer timer;
|
||||
std::exception_ptr reattachLifetimeExceptionPtr;
|
||||
std::optional<mrntt::MrnttNonViralNonPostingInvoker> reattachCReqInvoker;
|
||||
bool reattachOpInFlight = false;
|
||||
std::chrono::steady_clock::time_point lastReattachReqTimestamp{};
|
||||
sscl::co::NonViralTaskNursery taskNursery;
|
||||
boost::asio::deadline_timer daemonTimer;
|
||||
};
|
||||
|
||||
} // namespace device
|
||||
|
||||
Reference in New Issue
Block a user