From a8ef2420df7323ed7b16d2d29d15abd21b8934fe Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 20 May 2020 14:51:05 +0100 Subject: Guard against garbage collecting in multiple threads As the same time, I think I've seen issues with deleting links. --- guix-build-coordinator/agent.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/guix-build-coordinator/agent.scm b/guix-build-coordinator/agent.scm index 14e17e8..51f0c1d 100644 --- a/guix-build-coordinator/agent.scm +++ b/guix-build-coordinator/agent.scm @@ -24,6 +24,7 @@ #:use-module (ice-9 match) #:use-module (ice-9 futures) #:use-module (ice-9 atomic) + #:use-module (ice-9 threads) #:use-module (ice-9 exceptions) #:use-module (rnrs bytevectors) #:use-module (web http) @@ -211,8 +212,11 @@ (catch #t (lambda () - (with-store store - (delete-paths store output-file-names)) + ;; There can be issues deleting links when collecting garbage + ;; from multiple threads + (monitor + (with-store store + (delete-paths store output-file-names))) #t) (lambda (key args) (simple-format (current-error-port) -- cgit v1.2.3