original commit: 2c0b0b1fbb69bff828b76303fda0b4dcaf5daf6d
This commit is contained in:
Matthew Flatt 2001-11-05 22:13:47 +00:00
parent 0aae5335f7
commit 339cd457a4

View File

@ -124,12 +124,14 @@
[(sema) (make-semaphore)])
(let ([copy
(lambda (from)
(copy-port from wt)
(semaphore-wait sema)
(if other-done?
(close-output-port wt)
(set! other-done? #t))
(semaphore-post sema))])
(thread
(lambda ()
(copy-port from wt)
(semaphore-wait sema)
(if other-done?
(close-output-port wt)
(set! other-done? #t))
(semaphore-post sema))))])
(copy a)
(copy b)
rd))]))