From 1328aa33077fd1cf84869e366c82b8ea1d1abb5d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 31 Jan 2005 10:27:25 +0000 Subject: * Start of concurrent garbage collection. Processes write temporary roots to a per-process temporary file in /nix/var/nix/temproots while holding a write lock on that file. The garbage collector acquires read locks on all those files, thus blocking further progress in other Nix processes, and reads the sets of temporary roots. --- tests/gc-concurrent.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/gc-concurrent.sh') diff --git a/tests/gc-concurrent.sh b/tests/gc-concurrent.sh index d85c609825ee..c41475fb6ebd 100644 --- a/tests/gc-concurrent.sh +++ b/tests/gc-concurrent.sh @@ -1,6 +1,8 @@ storeExpr=$($TOP/src/nix-instantiate/nix-instantiate gc-concurrent.nix) outPath=$($TOP/src/nix-store/nix-store -q $storeExpr) +ls -l test-tmp/state/temproots + # Start a build in the background. $TOP/src/nix-store/nix-store -rvv "$storeExpr" & @@ -8,7 +10,7 @@ pid=$! # Run the garbage collector while the build is running. sleep 2 -$NIX_BIN_DIR/nix-collect-garbage +$NIX_BIN_DIR/nix-collect-garbage -vvvvv # Wait for the build to finish. echo waiting for pid $pid to finish... -- cgit 1.4.1