diff options
author | Christopher Baines <mail@cbaines.net> | 2020-05-20 14:51:05 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-05-20 17:29:41 +0100 |
commit | a8ef2420df7323ed7b16d2d29d15abd21b8934fe (patch) | |
tree | a1ec3d07ef036e8b5bcef859baacfb8c69707eef | |
parent | 2b3a7251e944422d8993e67d5486aed533b1d5d2 (diff) | |
download | build-coordinator-a8ef2420df7323ed7b16d2d29d15abd21b8934fe.tar build-coordinator-a8ef2420df7323ed7b16d2d29d15abd21b8934fe.tar.gz |
Guard against garbage collecting in multiple threads
As the same time, I think I've seen issues with deleting links.
-rw-r--r-- | guix-build-coordinator/agent.scm | 8 |
1 files 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) |