about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-01-11 23:00:02 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-01-11 23:00:02 -0800
commitdd5be871fa2e7e7b6e9d91faa6eab75dc225d2dd (patch)
treefe9422c3187eba6fc61d4f777d52cb28922fdc8c
parent491f9d7eb21861707c2d6ede22a1f3176e205cfa (diff)
downloadmu-dd5be871fa2e7e7b6e9d91faa6eab75dc225d2dd.tar.gz
538 - stdin app now responsive
-rw-r--r--mu.arc7
1 files changed, 6 insertions, 1 deletions
diff --git a/mu.arc b/mu.arc
index a06f90eb..731c6592 100644
--- a/mu.arc
+++ b/mu.arc
@@ -1868,7 +1868,12 @@
   (stdin:channel-address <- next-input)
   { begin
     (c:character <- read-key)
-    (loop-unless c:character)
+    { begin
+      (break-if c:character)
+      ; no key; end this time slice
+      (sleep for-some-cycles:literal 1:literal)
+      (loop 2:blocks)
+    }
     (curr:tagged-value <- save-type c:character)
     (stdin:channel-address/deref <- write stdin:channel-address curr:tagged-value)
     (loop)