e9a76808df
Simplify the use of clistate.Lock by creating a clistate.Locker instance, which stores the context of locking a state, to allow unlock to be called without knowledge of how the state was locked. This alows the backend code to bring the needed UI methods to the point where the state is locked, and still unlock the state from an outer scope. Provide a NoopLocker as well, so that callers can always call Unlock without verifying the status of the lock. Add the StateLocker field to the backend.Operation, so that the state lock can be carried between the different function scopes of the backend code. This will allow the backend context to lock the state before it's read, while allowing the different operations to unlock the state when they complete. |
||
---|---|---|
.. | ||
atlas | ||
init | ||
legacy | ||
local | ||
remote-state | ||
backend.go | ||
cli.go | ||
nil.go | ||
nil_test.go | ||
operation_type.go | ||
operationtype_string.go | ||
testing.go |