Is FileLock in java safe across multiple threads within the same process or between different processes or both?
The javadoc says:
File locks are held on behalf of the entire Java virtual machine. They are not suitable for controlling access to a file by multiple threads within the same virtual machine.
File-lock objects are safe for use by multiple concurrent threads.
which I don't really get: does it mean that FileLock is safe across multiple threads within the same single process, between multiple different processes or both?