parent
8dc0d7b591
commit
17a50b7c50
1 changed files with 3 additions and 1 deletions
|
@ -80,6 +80,8 @@ func (v *VM) Run() (err error) {
|
|||
|
||||
v.run()
|
||||
|
||||
atomic.StoreInt64(&v.aborting, 0)
|
||||
|
||||
err = v.err
|
||||
if err != nil {
|
||||
filePos := v.fileSet.Position(v.curFrame.fn.SourcePos(v.ip - 1))
|
||||
|
@ -115,7 +117,7 @@ func (v *VM) run() {
|
|||
}
|
||||
}()
|
||||
|
||||
for atomic.CompareAndSwapInt64(&v.aborting, 0, 0) {
|
||||
for atomic.LoadInt64(&v.aborting) == 0 {
|
||||
v.ip++
|
||||
|
||||
switch v.curInsts[v.ip] {
|
||||
|
|
Loading…
Reference in a new issue