From 598ecfc41954af57c53ba25a82a8db784a0310b3 Mon Sep 17 00:00:00 2001 From: Piotr Konopka Date: Mon, 7 Jul 2025 13:53:01 +0200 Subject: [PATCH] document what is safe about SafeStatus and SafeState OCTRL-873 --- core/workflow/safestate.go | 1 + core/workflow/safestatus.go | 1 + 2 files changed, 2 insertions(+) diff --git a/core/workflow/safestate.go b/core/workflow/safestate.go index 86c4f119..a2673bda 100644 --- a/core/workflow/safestate.go +++ b/core/workflow/safestate.go @@ -30,6 +30,7 @@ import ( "sync" ) +// SafeState is a thread-safe structure that holds the state of a role. type SafeState struct { mu sync.RWMutex state sm.State diff --git a/core/workflow/safestatus.go b/core/workflow/safestatus.go index 044e86be..ac23d38e 100644 --- a/core/workflow/safestatus.go +++ b/core/workflow/safestatus.go @@ -34,6 +34,7 @@ import ( "github.com/spf13/viper" ) +// SafeStatus is a thread-safe structure that holds the status of a role. type SafeStatus struct { mu sync.RWMutex status task.Status