From 339cd457a43fe2ed950a5444e41fefaf113a210b Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 5 Nov 2001 22:13:47 +0000 Subject: [PATCH] . original commit: 2c0b0b1fbb69bff828b76303fda0b4dcaf5daf6d --- collects/mzlib/thread.ss | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/collects/mzlib/thread.ss b/collects/mzlib/thread.ss index 9d9cca5..9ea8b01 100644 --- a/collects/mzlib/thread.ss +++ b/collects/mzlib/thread.ss @@ -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))]))