aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-01-15 00:11:33 +0100
committerDimitri Sokolyuk <demon@dim13.org>2018-01-15 00:11:33 +0100
commit26b0667b55c8b8279e3f4650d049bd75245ab39e (patch)
treee66b6f6fbb932b33f4afe7b24ad817fea43d7fb3
parent4f07f821e0d04e0cb6ec62d1d5bc3999dd7ba89a (diff)
rename to stop
-rw-r--r--eval.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/eval.go b/eval.go
index b22012f..c879d7a 100644
--- a/eval.go
+++ b/eval.go
@@ -24,7 +24,7 @@ type J1 struct {
d stack
r stack
console Console
- cancel context.CancelFunc
+ stop context.CancelFunc
}
func New() *J1 {
@@ -58,7 +58,7 @@ func (j1 *J1) LoadFile(fname string) error {
func (j1 *J1) Run() {
ctx, cancel := context.WithCancel(context.Background())
j1.console = NewConsole(ctx)
- j1.cancel = cancel
+ j1.stop = cancel
for {
select {
case <-ctx.Done():
@@ -86,7 +86,7 @@ func (j1 *J1) writeAt(addr, value uint16) {
case 0xf000: // key
j1.console.Write(value)
case 0xf002: // bye
- j1.cancel()
+ j1.stop()
}
}