Add a lock for plugins to use if using async code

Ref #1539
This commit is contained in:
Zachary Yedidia
2020-06-28 16:29:32 -04:00
parent f5c6f66c8f
commit 253281ae5e
3 changed files with 6 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ import (
"regexp"
"runtime"
"strings"
"sync"
"time"
"unicode/utf8"
@@ -24,6 +25,7 @@ import (
)
var L *lua.LState
var Lock sync.Mutex
// LoadFile loads a lua file
func LoadFile(module string, file string, data []byte) error {