diff options
author | Christopher Baines <mail@cbaines.net> | 2020-11-09 19:43:58 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-11-09 19:43:58 +0000 |
commit | c2125ac2deca9b824436a2bd3a5a14cb5ae353e7 (patch) | |
tree | 710545c2ba92a3e6e26c6254d1ea148b898a26eb | |
parent | c3db17b612dcf1043421ab6fdf87ae3f022c80fe (diff) | |
download | build-coordinator-c2125ac2deca9b824436a2bd3a5a14cb5ae353e7.tar build-coordinator-c2125ac2deca9b824436a2bd3a5a14cb5ae353e7.tar.gz |
Make call-with-time-logging write output in a thread safe way
-rw-r--r-- | guix-build-coordinator/utils.scm | 11 |
1 files 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 ...) |