Squash commits for public release

This commit is contained in:
2025-02-12 09:54:05 -05:00
commit 7118adc514
1108 changed files with 80873 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
#pragma once
#include "Exec.h"
#include <iostream>
#include <libfoundation/EventReceiver.h>
#include <vector>
namespace LaunchServer {
class LaunchWatchdog : public LFoundation::EventReceiver {
public:
inline static LaunchWatchdog& the()
{
extern LaunchWatchdog* s_LaunchServer_LaunchWatchdog_the;
return *s_LaunchServer_LaunchWatchdog_the;
}
LaunchWatchdog();
~LaunchWatchdog() = default;
void tick()
{
for (auto& exec : m_execs) {
if (!exec.is_alive()) {
exec.launch();
}
}
}
void add(const Exec& exec) { m_execs.push_back(exec); }
void add(Exec&& exec) { m_execs.push_back(std::move(exec)); }
private:
std::vector<Exec> m_execs;
};
}