Import std.io.lock
std.io.lock
std.io's file locks: a FileLock holds a lock on a file, which another FileLock, in this program or another, waits for, or is refused, until it's closed. Locks only keep other locks out: on every OS, anyone can still read and write the file.
std/io/lock.fb
Types
FileLock
class
Public Class FileLock
A lock on a file, held for this FileLock alone, or shared with other shared ones, until Close, or until its last reference goes. The file is made, empty, when it isn't there, and stays when the lock goes. A FileLock waiting for one that this program holds waits forever.
-
The file it locks.
-
A lock on the file for this one alone, once no other holds one.
-
What Acquire does, without blocking its thread: a call gives its Task.
-
A lock for this one alone, or Null when another holds one now.
-
Whether it still holds its lock.
-
Lets go of the lock, which a second Close leaves alone.
Report an issue with this page or with FutureBlitz on GitHub.