about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-10-23 19:57:26 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-10-23 19:57:26 -0700
commitccfee30398074e2b5276a0ba295464ded4945ec9 (patch)
treed236abf7d85dad9f39f5b5413fe2b2ebcadc0f96
parentf918675c8b11adb80a83000a3a984e4ff3bdcf1b (diff)
downloadmu-ccfee30398074e2b5276a0ba295464ded4945ec9.tar.gz
3570 - don't busy-wait in 'wait-for-event'
-rw-r--r--084console.mu4
1 files changed, 3 insertions, 1 deletions
diff --git a/084console.mu b/084console.mu
index 3677b84c..0faeb038 100644
--- a/084console.mu
+++ b/084console.mu
@@ -90,7 +90,9 @@ def wait-for-event console:&:console -> console:&:console [
   load-ingredients
   {
     _, found?:bool <- read-event console
-    loop-unless found?
+    break-if found?
+    switch
+    loop
   }
 ]