Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor accesses from outside of the Firestarter class #85

Open
2 tasks
marenz2569 opened this issue Nov 3, 2024 · 0 comments
Open
2 tasks

Refactor accesses from outside of the Firestarter class #85

marenz2569 opened this issue Nov 3, 2024 · 0 comments
Labels
backlog technical debt Backlog of things that should be improved in the code-base

Comments

@marenz2569
Copy link
Member

Currently we support one instance of the Firestarter class. Variables that need to be accessed from outside the class, e.g. in the sigterm handler are inline static:

  inline static std::unique_ptr<optimizer::OptimizerWorker> Optimizer;
  inline static bool WatchdogTerminate = false;
  inline static std::condition_variable WatchdogTerminateAlert;
  inline static std::mutex WatchdogTerminateMutex;
  inline static volatile LoadThreadWorkType LoadVar = LoadThreadWorkType::LoadLow;

DoD

  • Provide an interface to control the runtime adjustable parameters (e.g. termination signal, load status)
  • Use a pointer to the Firestarter class to call the functions for adjusting parameters instead of using inline static
@marenz2569 marenz2569 added the backlog technical debt Backlog of things that should be improved in the code-base label Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog technical debt Backlog of things that should be improved in the code-base
Projects
None yet
Development

No branches or pull requests

1 participant