32 ms·
We found difficulty with the purely advisory locking that Linux had. Also the possibility of network filesystems made it a pain. Do you have any experience wit
by smeagull 4y ago
We found difficulty with the purely advisory locking that Linux had. Also the possibility of network filesystems made it a pain.
Do you have any experience with either?
- andrewstuart 4y agoYou don't lock, you move the file that it next to be processed. File moves are atomic. You move the file out of the list of files that are being picked up for processing. Lock free.
- andrewstuart 4y agoNetwork file systems do not support atomic moves, but you should not run such an application on a network file system.
- remram 4y agoI also found that advisory locking has a lot of gotchas, especially when used in multithread contexts (apparently you can lose the lock because a different thread closed a different file descriptor on the same file).