about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--mu.arc9
1 files changed, 3 insertions, 6 deletions
diff --git a/mu.arc b/mu.arc
index 731c6592..38325186 100644
--- a/mu.arc
+++ b/mu.arc
@@ -1867,13 +1867,10 @@
   (default-space:space-address <- new space:literal 30:literal)
   (stdin:channel-address <- next-input)
   { begin
+    ; keyboard input is infrequent; sleep at the start of each iteration
+    (sleep for-some-cycles:literal 1:literal)
     (c:character <- read-key)
-    { begin
-      (break-if c:character)
-      ; no key; end this time slice
-      (sleep for-some-cycles:literal 1:literal)
-      (loop 2:blocks)
-    }
+    (loop-unless c:character)
     (curr:tagged-value <- save-type c:character)
     (stdin:channel-address/deref <- write stdin:channel-address curr:tagged-value)
     (loop)