comment MutexWithCheck
This commit is contained in:
+5
-3
@@ -65,10 +65,12 @@ type FunctionID = paas.FunctionID
|
|||||||
type Function = paas.Function
|
type Function = paas.Function
|
||||||
type BootOrder = paas.BootOrder
|
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 {
|
type MutexWithCheck struct {
|
||||||
ml sync.Mutex
|
ml sync.Mutex // wrapper mutex
|
||||||
v sync.Mutex
|
v sync.Mutex // wrapped mutex
|
||||||
l bool
|
l bool // wrapped state
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *MutexWithCheck) Lock() {
|
func (m *MutexWithCheck) Lock() {
|
||||||
|
|||||||
Reference in New Issue
Block a user