Skip to content
Snippets Groups Projects
Commit 9c37f1b0 authored by Simon McVittie's avatar Simon McVittie
Browse files

runtime: Fix locking behaviour in variable directory


We need to hold an exclusive lock while carrying out GC, because any
number of processes could be trying to create temporary copies there
at the same time, and if that's happening then it's unsafe for the
GC pass to be looking at the temporary copies concurrently. Only do
the GC pass opportunistically, if we can get an exclusive lock without
waiting.

Conversely, while we're creating the temporary copies, we continue to
take out a non-exclusive lock; but if another process is in the middle
of a GC pass, we want to wait for it instead of just failing.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 4038d0e7
No related branches found
No related tags found
1 merge request!239Make pressure-vessel responsible for unpacking runtimes
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment