First of all, thanks for this very useful gem!
Regarding this from the Readme.md:
Running setup or teardown once
require "parallel_tests"
# preparation:
# affected by race-condition: first process may boot slower than the second
# either sleep a bit or use a lock for example File.lock
ParallelTests.first_process? ? do_something : sleep(1)
AFAICT, File.lock is not part of the Ruby standard library. Is it perhaps from a gem? I do see File#flock, but I'm not too familiar with it. Maybe that's what this was referring to?
It would be helpful to have a working example with a lock if possible.