HH\Lib\File\Handle::lock
Get a shared or exclusive lock on the file
public function lock(
HH\Lib\File\LockType $type,
): HH\Lib\File\Lock;
This will block until it acquires the lock, which may be forever.
This involves a blocking syscall; async code will not execute while waiting for a lock.
Parameters
HH\Lib\File\LockType $type