FileBase.lock

Locks the specified file segment. If the file segment is already locked by another process, waits until the existing lock is released.

Note that this is a per-process lock. This locking mechanism should not be used for thread-level synchronization. For that, use the synchronized statement.

struct FileBase
void
lock
(,
long start = 0
,
long length = long.max
)

Meta