aboutsummaryrefslogtreecommitdiff
path: root/cmd/eval
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/eval')
-rw-r--r--cmd/eval/main.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/eval/main.go b/cmd/eval/main.go
index a5fa686..152824c 100644
--- a/cmd/eval/main.go
+++ b/cmd/eval/main.go
@@ -4,6 +4,7 @@ import (
"context"
"dim13.org/j1"
+ "dim13.org/j1/console"
)
func main() {
@@ -11,5 +12,7 @@ func main() {
if err := vm.LoadFile("testdata/j1e.bin"); err != nil {
panic(err)
}
- vm.Run(context.Background())
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+ vm.Run(ctx, cancel, console.New(ctx))
}