From d44123cabaa730c778a0e2644c75dbfba6a7ab30 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 12 Jun 2015 22:34:45 -0700 Subject: 1556 --- html/channel.mu.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'html/channel.mu.html') diff --git a/html/channel.mu.html b/html/channel.mu.html index e6f7df34..82a17f6f 100644 --- a/html/channel.mu.html +++ b/html/channel.mu.html @@ -17,7 +17,7 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } .Comment { color: #8080ff; } .Constant { color: #008080; } .Special { color: #ff6060; } -.Identifier { color: #008080; } +.muControl { color: #804000; } .muRecipe { color: #ff8700; } --> @@ -34,38 +34,38 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } recipe producer [ # produce numbers 1 to 5 on a channel - default-space:address:array:location <- new location:type, 30:literal - chan:address:channel <- next-ingredient + default-space:address:array:location <- new location:type, 30:literal + chan:address:channel <- next-ingredient # n = 0 n:number <- copy 0:literal { done?:boolean <- lesser-than n:number, 5:literal - break-unless done?:boolean + break-unless done?:boolean # other threads might get between these prints - $print [produce: ], n:number, [ + $print [produce: ], n:number, [ ] chan:address:channel <- write chan:address:channel, n:number n:number <- add n:number, 1:literal - loop + loop } ] recipe consumer [ # consume and print integers from a channel - default-space:address:array:location <- new location:type, 30:literal - chan:address:channel <- next-ingredient + default-space:address:array:location <- new location:type, 30:literal + chan:address:channel <- next-ingredient { # read an integer from the channel n:number, chan:address:channel <- read chan:address:channel # other threads might get between these prints - $print [consume: ], n:number, [ + $print [consume: ], n:number, [ ] - loop + loop } ] recipe main [ - default-space:address:array:location <- new location:type, 30:literal + default-space:address:array:location <- new location:type, 30:literal chan:address:channel <- init-channel 3:literal # create two background 'routines' that communicate by a channel routine1:number <- start-running producer:recipe, chan:address:channel -- cgit 1.4.1-2-gfad0