aboutsummaryrefslogtreecommitdiff
path: root/zenserver/compute/apply.h
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-08-24 16:09:54 +0200
committerStefan Boberg <[email protected]>2021-08-24 16:09:54 +0200
commit786e814b95d8dab99cc1020c889741f996c89972 (patch)
tree661a0e7f3a0bea8ff6fed7b513095a7028b7d2bb /zenserver/compute/apply.h
parentMerge branch 'main' of https://github.com/EpicGames/zen (diff)
downloadzen-786e814b95d8dab99cc1020c889741f996c89972.tar.xz
zen-786e814b95d8dab99cc1020c889741f996c89972.zip
WIP interface for submitting workers/jobs
Diffstat (limited to 'zenserver/compute/apply.h')
-rw-r--r--zenserver/compute/apply.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/zenserver/compute/apply.h b/zenserver/compute/apply.h
index e079317ec..cb91be07e 100644
--- a/zenserver/compute/apply.h
+++ b/zenserver/compute/apply.h
@@ -2,10 +2,13 @@
#pragma once
+#include <zencore/compactbinary.h>
#include <zencore/httpserver.h>
+#include <zencore/iohash.h>
#include <spdlog/spdlog.h>
#include <filesystem>
+#include <unordered_map>
namespace zen {
@@ -32,6 +35,14 @@ private:
std::atomic<int> m_SandboxCount{0};
std::filesystem::path CreateNewSandbox();
+
+ struct WorkerDesc
+ {
+ CbObject Descriptor;
+ };
+
+ RwLock m_WorkerLock;
+ std::unordered_map<IoHash, WorkerDesc> m_WorkerMap;
};
} // namespace zen