aboutsummaryrefslogtreecommitdiff
path: root/src/zencompute/functionservice.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2026-02-27 12:05:41 +0100
committerStefan Boberg <[email protected]>2026-02-27 12:05:41 +0100
commitebdc8c19da54756a0969e2b2c624f2eae3ea8aff (patch)
treee4e2d06ee7f3f2dc989af0642877ed0c6c028876 /src/zencompute/functionservice.cpp
parentFunctionServiceSession::Impl::SubmitActions now uses the batching LocalProces... (diff)
downloadzen-ebdc8c19da54756a0969e2b2c624f2eae3ea8aff.tar.xz
zen-ebdc8c19da54756a0969e2b2c624f2eae3ea8aff.zip
made local action submits more async by introducing "submitting" state
Diffstat (limited to 'src/zencompute/functionservice.cpp')
-rw-r--r--src/zencompute/functionservice.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/zencompute/functionservice.cpp b/src/zencompute/functionservice.cpp
index fa4656ac4..42b009319 100644
--- a/src/zencompute/functionservice.cpp
+++ b/src/zencompute/functionservice.cpp
@@ -49,6 +49,8 @@ using namespace std::literals;
namespace zen::compute {
+static_assert(ZEN_ARRAY_COUNT(FunctionServiceSession::ActionHistoryEntry::Timestamps) == static_cast<size_t>(RunnerAction::State::_Count));
+
//////////////////////////////////////////////////////////////////////////
struct FunctionServiceSession::Impl
@@ -789,6 +791,9 @@ FunctionServiceSession::Impl::SchedulePendingActions()
ActionsToSchedule.push_back(Pending);
break;
+ case RunnerAction::State::Submitting:
+ break; // already claimed by async submission
+
case RunnerAction::State::Running:
case RunnerAction::State::Completed:
case RunnerAction::State::Failed:
@@ -905,6 +910,9 @@ FunctionServiceSession::Impl::HandleActionUpdates()
m_PendingLock.WithExclusiveLock([&] { m_PendingActions.insert({ActionLsn, Action}); });
break;
+ case RunnerAction::State::Submitting:
+ break; // still in pending map, async submission in progress
+
case RunnerAction::State::Running:
m_PendingLock.WithExclusiveLock([&] {
m_RunningLock.WithExclusiveLock([&] {