diff options
Diffstat (limited to 'channel.mu')
-rw-r--r-- | channel.mu | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/channel.mu b/channel.mu index d74cbcad..e7415754 100644 --- a/channel.mu +++ b/channel.mu @@ -24,7 +24,8 @@ def consumer source:address:source:character -> source:address:source:character load-ingredients { # read an integer from the channel - n:character, source <- read source + n:character, eof?:boolean, source <- read source + break-if eof? # other threads might get between these prints $print [consume: ], n:character, [ ] |