From 33f1adb3264370f434058d177ed9512c9e0f72e1 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Tue, 7 Jul 2026 23:37:37 +0000 Subject: [PATCH] comment MutexWithCheck --- app/types.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/types.go b/app/types.go index 183a20c..9c0d136 100644 --- a/app/types.go +++ b/app/types.go @@ -65,10 +65,12 @@ type FunctionID = paas.FunctionID type Function = paas.Function type BootOrder = paas.BootOrder +// wraps a mutex and mutex state value under a single mutex interface with support for IsLocked check +// highly cursed type MutexWithCheck struct { - ml sync.Mutex - v sync.Mutex - l bool + ml sync.Mutex // wrapper mutex + v sync.Mutex // wrapped mutex + l bool // wrapped state } func (m *MutexWithCheck) Lock() {