Tries to acquire the lock if it is available within the given timeout, block untill successful
Releases the lock
Provides a file-based mutex control, or non-reentrant lock.
A typical use should use the
SmvLock.withLockmethod in the companion object, or follow the idiom below:val sl = SmvLock("/path/to/my/file.lock") sl.lock() try { // access lock-protected resource } finally { sl.unlock() }The parenthese
()is recommended to indicate use of side effect.