Function FileBasedLock.lockBlock

Attempts to lock the file and blocks until the lock is acquired

void lockBlock();