filelock icon indicating copy to clipboard operation
filelock copied to clipboard

Race conditions for processes trying to acquire a lock

Open talegari opened this issue 3 years ago • 2 comments

Hi Gábor Csárdi,

This question is about understanding the way filelock is implemented:

Suppose, process 1 has acquired a lock. Before process 1 unlocks it, process 2, 3 ... n attempt to acquire the lock. Process 2 made an attempt before process 3, 3 before 4 and so on. Once process 1 unlocks, does 2 acquire the lock? In general, process (i + 1) acquire the lock after process i unlocks the lock file?

Thanks for the package anyways.

talegari avatar Feb 20 '21 19:02 talegari