Skip to content

Commit d4bccac

Browse files
author
DaanSelen
committed
feat: add execution in goroutine
1 parent 47fb9d6 commit d4bccac

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

src/modules/draw/draw.go

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,17 @@ func MakeFooter(targEntry *widget.Entry, book *string, app fyne.App) *fyne.Conta
7676
if !ok {
7777
log.Println("something went wrong while looking for the binary, see above for details")
7878
}
79-
ok, result = runner.RunMeshbook(path, *book, targEntry.Text)
80-
if !ok {
81-
log.Println("something went wrong while running the meshbook, see above for details")
82-
}
83-
log.Println(result)
84-
textEntry.SetText(result)
85-
showBtn.Enable()
79+
80+
log.Println("kicking off goroutine")
81+
go func() {
82+
ok, result = runner.RunMeshbook(path, *book, targEntry.Text)
83+
if !ok {
84+
log.Println("something went wrong while running the meshbook, see above for details")
85+
}
86+
log.Println(result)
87+
textEntry.SetText(result)
88+
showBtn.Enable()
89+
}()
8690

8791
})
8892
actionWrap := container.NewGridWrap(

0 commit comments

Comments
 (0)