| ... | ... | @@ -139,7 +139,11 @@ pub const CacheHash = struct { |
| 139 | 139 | const manifest_file_path = try fmt.allocPrint(self.alloc, "{}.txt", .{self.b64_digest}); |
| 140 | 140 | defer self.alloc.free(manifest_file_path); |
| 141 | 141 | |
| 142 | | self.manifest_file = try self.manifest_dir.createFile(manifest_file_path, .{ .read = true, .truncate = false }); |
| 142 | self.manifest_file = try self.manifest_dir.createFile(manifest_file_path, .{ |
| 143 | .read = true, |
| 144 | .truncate = false, |
| 145 | .lock = .Exclusive, |
| 146 | }); |
| 143 | 147 | } |
| 144 | 148 | |
| 145 | 149 | // TODO: Figure out a good max value? |
| ... | ... | @@ -213,7 +217,7 @@ pub const CacheHash = struct { |
| 213 | 217 | |
| 214 | 218 | if (any_file_changed) { |
| 215 | 219 | // cache miss |
| 216 | | // keep the manifest file open (TODO: with rw lock) |
| 220 | // keep the manifest file open |
| 217 | 221 | // reset the hash |
| 218 | 222 | self.blake3 = Blake3.init(); |
| 219 | 223 | self.blake3.update(&bin_digest); |