aboutsummaryrefslogtreecommitdiff
path: root/cmd/j1e/main.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-01-24 00:25:10 +0100
committerDimitri Sokolyuk <demon@dim13.org>2018-01-24 00:25:10 +0100
commit07584da73461b69043451ebe48fcac226202492a (patch)
tree1f65f42f61bd10079ff369b039ff8dc0282f816d /cmd/j1e/main.go
parentbc1a7a271ba5a3f971e9dbed774b01b43af2642e (diff)
extract console, extract context
Diffstat (limited to 'cmd/j1e/main.go')
-rw-r--r--cmd/j1e/main.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/j1e/main.go b/cmd/j1e/main.go
index 057e106..8f31aeb 100644
--- a/cmd/j1e/main.go
+++ b/cmd/j1e/main.go
@@ -6,10 +6,13 @@ import (
"context"
"dim13.org/j1"
+ "dim13.org/j1/console"
)
func main() {
vm := j1.New()
vm.LoadBytes(J1eBin)
- vm.Run(context.Background())
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+ vm.Run(ctx, cancel, console.New(ctx))
}