Parallel runs of `pack` instances are not synronised and can lead to inconsistent state
Opened this issue · 0 comments
buzden commented
Different instances of pack
can change files inside $PACK_DIR
. Sometimes, especially when there is a need of updating $PACK_DIR/.cache
, they are trying to do same things on the same files.
We can try to synchronise some operations like caching and installing using file-system-based synchonisations. The most portable way that I know is mkdir
. The most convenient way is flock
, but I think it is available mostly on Linux machines.
Anyway, we need to think of the design of this, I mean how to determine when do we need to synchronise and at what granularity.