summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/d5/tengo/v2/script.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/d5/tengo/v2/script.go')
-rw-r--r--vendor/github.com/d5/tengo/v2/script.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/github.com/d5/tengo/v2/script.go b/vendor/github.com/d5/tengo/v2/script.go
index 4cca4d04..16f2944b 100644
--- a/vendor/github.com/d5/tengo/v2/script.go
+++ b/vendor/github.com/d5/tengo/v2/script.go
@@ -247,8 +247,8 @@ func (c *Compiled) RunContext(ctx context.Context) (err error) {
// Clone creates a new copy of Compiled. Cloned copies are safe for concurrent
// use by multiple goroutines.
func (c *Compiled) Clone() *Compiled {
- c.lock.Lock()
- defer c.lock.Unlock()
+ c.lock.RLock()
+ defer c.lock.RUnlock()
clone := &Compiled{
globalIndexes: c.globalIndexes,