filelock
filelock copied to clipboard
Cross platform file locking in R
The correctness of locking is contingent on simple file patterns. Side-by-side, two R processes on the same host, code executed from top to bottom in order. ```r system("uname -a") #...
Currently filelock restores the SIGALRM handler to its previous state but the itimer state is not restored.
Useful for https://github.com/r-lib/pkgdepends/issues/141, then we can print out the pid of the other process.
Otherwise the file is kept locked, which is a problem on windows, because even the same process cannot (re-)lock it.
I.e. if you first lock exclusively, then shared, or the other way. Ideally this should work, and only the the more restrictive lock type should be used.
Not so much a filelock issue, although we could document it here. I really like how the new apt package manager handles this: ``` apt(8) now waits for the dpkg...