Anonymous user
Synchronous concurrency: Difference between revisions
→{{header|Racket}}
Line 2,256:
;; 2) Send the total number of lines printed to the Reader thread.
(define (printer)
(thread-send reader-thread
(for/sum ([line (in-producer thread-receive eof)])
(
;; Start both threads
|