From c66dd48b6e1e0350119810f80d46845806156cec Mon Sep 17 00:00:00 2001 From: James Bardin Date: Thu, 6 Jul 2017 16:25:47 -0400 Subject: [PATCH] make shadow.Value a Locker This way it's correctly handled by CopyStructure --- helper/shadow/value.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/helper/shadow/value.go b/helper/shadow/value.go index 2413335b8..178b7e78a 100644 --- a/helper/shadow/value.go +++ b/helper/shadow/value.go @@ -26,6 +26,14 @@ type Value struct { 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" see the struct docs. func (w *Value) Close() error {