Hacker News new | ask | show | jobs
by andrewstuart 1361 days ago
You 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.