struct Lock [src]

Fields

manifest_file: fs.File

Members

Source

pub const Lock = struct { manifest_file: fs.File, pub fn release(lock: *Lock) void { if (builtin.os.tag == .windows) { // Windows does not guarantee that locks are immediately unlocked when // the file handle is closed. See LockFileEx documentation. lock.manifest_file.unlock(); } lock.manifest_file.close(); lock.* = undefined; } }