Lock main goroutine to OS thread
commit8aed6fc58921986c379269f6fb94897449d58344
authorRob Blanckaert <basicer@basicer.com>
dateSat 20 Oct 2018, 02:15 (8 years ago)
parentbd47c67
utils/utils.go+2
@@ -5,6 +5,7 @@ import (
55 "fmt"
66 "io"
77 "os"
8+ "runtime"
89 "syscall"
910)
1011
@@ -43,6 +44,7 @@ func DoCli(p PluginBase) {
4344
4445 args := flag.Args()
4546
47+ runtime.LockOSThread()
4648 p.Open()
4749 lang := &Language{ptr: p, ps1: ps1}
4850