Spinscale: PuppetComponent takes PuppetApplication&

This commit is contained in:
2025-12-27 14:15:17 -04:00
parent f862db922e
commit 0c4f427c0a
13 changed files with 66 additions and 42 deletions
+5 -3
View File
@@ -5,10 +5,10 @@
#include <memory>
#include <functional>
#include <spinscale/callback.h>
#include <spinscale/puppetApplication.h>
namespace smo {
class Mind;
class ComponentThread;
class Component
@@ -27,11 +27,13 @@ class PuppetComponent
: public Component
{
public:
PuppetComponent(Mind &parent, const std::shared_ptr<ComponentThread> &thread);
PuppetComponent(
PuppetApplication &parent,
const std::shared_ptr<ComponentThread> &thread);
~PuppetComponent() = default;
public:
Mind &parent;
PuppetApplication &parent;
};
} // namespace smo
@@ -31,6 +31,9 @@ public:
void exitAllPuppetThreadsReq(
Callback<puppetThreadLifetimeMgmtOpCbFn> callback);
// CPU distribution method
void distributeAndPinThreadsAcrossCpus();
protected:
// Collection of PuppetThread instances
std::vector<std::shared_ptr<PuppetThread>> componentThreads;