diff options
author | Christopher Baines <mail@cbaines.net> | 2020-06-20 12:03:58 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-06-20 12:03:58 +0100 |
commit | fa6db19ff1b60ca3faab30e37787bbf9f486f5f0 (patch) | |
tree | 59ad9a92b1e36e47beb4dc30ba8800ec2dc1ddf9 | |
parent | ae27b67719d89a540cc9b2cc5c60a1fec00422bd (diff) | |
download | build-coordinator-fa6db19ff1b60ca3faab30e37787bbf9f486f5f0.tar build-coordinator-fa6db19ff1b60ca3faab30e37787bbf9f486f5f0.tar.gz |
Make worker threads compatible with multiple return values
-rw-r--r-- | guix-build-coordinator/utils.scm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm index 22da21a..440b31b 100644 --- a/guix-build-coordinator/utils.scm +++ b/guix-build-coordinator/utils.scm @@ -91,7 +91,10 @@ arguments of the worker thread procedure." "worker-thread: exception: ~A\n" exn) (raise-exception exn)) (lambda () - (apply proc args)))) + (call-with-values + (lambda () + (apply proc args)) + (lambda vals vals))))) #:unwind? #t)))) (loop))))))) (iota parallelism)) @@ -109,7 +112,7 @@ If already in the worker thread, call PROC immediately." (('worker-thread-error . exn) (raise-exception exn)) (result - result)))))) + (apply values result))))))) (define (random-v4-uuid) ;; https://tools.ietf.org/html/rfc4122#page-14 |