use channel and remove logs

This commit is contained in:
vedhavyas committed 2019-08-19 21:35:19 -04:00
1 parent 3351f3eb4b
commit 9a613261cb
3 files changed
+15 -21

No files matched your search

+7 -3
View File
@@ -13,11 +13,15 @@ func main() {
log.Fatal(err)
}
init, done := make(chan bool), make(chan error)
init, done := make(chan error), make(chan bool)
go b.Run(init, done)
<-init
err = <-init
if err != nil {
panic(err)
}
res, err := b.CallFunc("printWasm", &[]interface{}{"Hello from Go"})
fmt.Println(res, err)
err = <-done
<-done
fmt.Println("wasm exited", err)
}