make shadow.Value a Locker

This way it's correctly handled by CopyStructure
This commit is contained in:
James Bardin 2017-07-06 16:25:47 -04:00
parent 583cc350a9
commit c66dd48b6e
1 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,14 @@ type Value struct {
valueSet bool valueSet bool
} }
func (v *Value) Lock() {
v.lock.Lock()
}
func (v *Value) Unlock() {
v.lock.Unlock()
}
// Close closes the value. This can never fail. For a definition of // Close closes the value. This can never fail. For a definition of
// "close" see the struct docs. // "close" see the struct docs.
func (w *Value) Close() error { func (w *Value) Close() error {