diff options
| author | Dan Engelbrecht <[email protected]> | 2026-04-13 19:17:09 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-04-13 19:17:09 +0200 |
| commit | 3d59b5d7036c35fe484d052ff32dbdc9d0a75cf7 (patch) | |
| tree | 8d24babc8cd3d097800af0bd960c7ba1d72927d7 /src/zencompute/computeservice.cpp | |
| parent | use mimalloc by default (#952) (diff) | |
| download | zen-3d59b5d7036c35fe484d052ff32dbdc9d0a75cf7.tar.xz zen-3d59b5d7036c35fe484d052ff32dbdc9d0a75cf7.zip | |
fix utf characters in source code (#953)
Diffstat (limited to 'src/zencompute/computeservice.cpp')
| -rw-r--r-- | src/zencompute/computeservice.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/zencompute/computeservice.cpp b/src/zencompute/computeservice.cpp index 852e93fa0..7f354a51c 100644 --- a/src/zencompute/computeservice.cpp +++ b/src/zencompute/computeservice.cpp @@ -449,7 +449,7 @@ ComputeServiceSession::Impl::RequestStateTransition(SessionState NewState) return true; } - // CAS failed, Current was updated — retry with the new value + // CAS failed, Current was updated - retry with the new value } } @@ -1612,7 +1612,7 @@ ComputeServiceSession::Impl::SchedulePendingActions() // Also note that the m_PendingActions list is not maintained // here, that's done periodically in SchedulePendingActions() - // Extract pending actions under a shared lock — we only need to read + // Extract pending actions under a shared lock - we only need to read // the map and take Ref copies. ActionState() is atomic so this is safe. // Sorting and capacity trimming happen outside the lock to avoid // blocking HTTP handlers on O(N log N) work with large pending queues. @@ -1741,7 +1741,7 @@ ComputeServiceSession::Impl::SchedulerThreadFunction() HandleActionUpdates(); - // Auto-transition Draining → Paused when all work is done + // Auto-transition Draining -> Paused when all work is done if (m_SessionState.load(std::memory_order_relaxed) == SessionState::Draining) { bool AllDrained = m_ActionMapLock.WithSharedLock([&] { return m_PendingActions.empty() && m_RunningMap.empty(); }); @@ -1866,7 +1866,7 @@ ComputeServiceSession::Impl::RescheduleAction(int ActionLsn) } } - // Reset action state — this calls PostUpdate() internally + // Reset action state - this calls PostUpdate() internally Action->ResetActionStateToPending(); int NewRetryCount = Action->RetryCount.load(std::memory_order_relaxed); @@ -1948,7 +1948,7 @@ ComputeServiceSession::Impl::HandleActionUpdates() // This is safe because state transitions are monotonically increasing by enum // rank (Pending < Submitting < Running < Completed/Failed/Cancelled), so // SetActionState rejects any transition to a lower-ranked state. By the time - // we read ActionState() here, it reflects the highest state reached — making + // we read ActionState() here, it reflects the highest state reached - making // the first occurrence per LSN authoritative and duplicates redundant. for (Ref<RunnerAction>& Action : UpdatedActions) { @@ -1958,7 +1958,7 @@ ComputeServiceSession::Impl::HandleActionUpdates() { switch (Action->ActionState()) { - // Newly enqueued — add to pending map for scheduling + // Newly enqueued - add to pending map for scheduling case RunnerAction::State::Pending: // Guard against a race where the session is abandoned between // EnqueueAction (which calls PostUpdate) and this scheduler @@ -1979,11 +1979,11 @@ ComputeServiceSession::Impl::HandleActionUpdates() } break; - // Async submission in progress — remains in pending map + // Async submission in progress - remains in pending map case RunnerAction::State::Submitting: break; - // Dispatched to a runner — move from pending to running + // Dispatched to a runner - move from pending to running case RunnerAction::State::Running: m_ActionMapLock.WithExclusiveLock([&] { m_RunningMap.insert({ActionLsn, Action}); @@ -1992,7 +1992,7 @@ ComputeServiceSession::Impl::HandleActionUpdates() ZEN_DEBUG("action {} ({}) RUNNING", Action->ActionId, ActionLsn); break; - // Retracted — pull back for rescheduling without counting against retry limit + // Retracted - pull back for rescheduling without counting against retry limit case RunnerAction::State::Retracted: { m_ActionMapLock.WithExclusiveLock([&] { @@ -2004,7 +2004,7 @@ ComputeServiceSession::Impl::HandleActionUpdates() break; } - // Rejected — runner was at capacity, reschedule without retry cost + // Rejected - runner was at capacity, reschedule without retry cost case RunnerAction::State::Rejected: { Action->ResetActionStateToPending(); @@ -2012,7 +2012,7 @@ ComputeServiceSession::Impl::HandleActionUpdates() break; } - // Terminal states — move to results, record history, notify queue + // Terminal states - move to results, record history, notify queue case RunnerAction::State::Completed: case RunnerAction::State::Failed: case RunnerAction::State::Abandoned: @@ -2021,7 +2021,7 @@ ComputeServiceSession::Impl::HandleActionUpdates() auto TerminalState = Action->ActionState(); // Automatic retry for Failed/Abandoned actions with retries remaining. - // Skip retries when the session itself is abandoned — those actions + // Skip retries when the session itself is abandoned - those actions // were intentionally abandoned and should not be rescheduled. if ((TerminalState == RunnerAction::State::Failed || TerminalState == RunnerAction::State::Abandoned) && m_SessionState.load(std::memory_order_relaxed) < SessionState::Abandoned) |