From c2125ac2deca9b824436a2bd3a5a14cb5ae353e7 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 9 Nov 2020 19:43:58 +0000 Subject: Make call-with-time-logging write output in a thread safe way --- guix-build-coordinator/utils.scm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm index 6a69c94..0dd1473 100644 --- a/guix-build-coordinator/utils.scm +++ b/guix-build-coordinator/utils.scm @@ -514,11 +514,12 @@ References: ~a~%" (lambda vals (let* ((end (current-time time-utc)) (elapsed (time-difference end start))) - (format (current-output-port) - "~a took ~a seconds~%" - name - (+ (time-second elapsed) - (/ (time-nanosecond elapsed) 1e9))) + (display + (format #f + "~a took ~a seconds~%" + name + (+ (time-second elapsed) + (/ (time-nanosecond elapsed) 1e9)))) (apply values vals)))))) (define-syntax-rule (with-time-logging name exp ...) -- cgit v1.2.3