Merge pull request #1495 from aluzzardi/fix-data-race
value.Walk: fix data race
This commit is contained in:
commit
c6d4ffb75e
@ -185,7 +185,10 @@ func (v *Value) IsConcreteR(opts ...cue.Option) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (v *Value) Walk(before func(*Value) bool, after func(*Value)) {
|
func (v *Value) Walk(before func(*Value) bool, after func(*Value)) {
|
||||||
// FIXME: lock?
|
// FIXME: this is a long lock
|
||||||
|
v.cc.rlock()
|
||||||
|
defer v.cc.runlock()
|
||||||
|
|
||||||
var (
|
var (
|
||||||
llBefore func(cue.Value) bool
|
llBefore func(cue.Value) bool
|
||||||
llAfter func(cue.Value)
|
llAfter func(cue.Value)
|
||||||
|
Reference in New Issue
Block a user