feat(furvm): introduce executor

This commit is contained in:
2026-06-06 21:05:17 +02:00
parent 16b6b9549c
commit a869f71f3a
6 changed files with 145 additions and 5 deletions
+20
View File
@@ -0,0 +1,20 @@
#include "furvm/executor.hpp"
#include "furvm/context.hpp"
namespace furvm {
executor::executor(egzekutor, executor_handle id, const std::shared_ptr<context>& context)
: m_id(id), m_context(context) {}
executor::~executor() {
m_context->m_executors[m_id] = nullptr;
}
std::shared_ptr<executor> executor::create(const std::shared_ptr<context>& context) {
auto ex = std::make_shared<executor>(egzekutor{}, context->m_executors.size(), context);
context->m_executors.push_back(ex);
return std::move(ex);
}
} // namespace furvm