diff options
author | 2021-07-26 18:57:09 -0700 | |
---|---|---|
committer | 2021-07-26 18:57:09 -0700 | |
commit | 5164b69b57e8c11666591823c5b83435facce5c8 (patch) | |
tree | 9670c3383142b606c41bb57699a904fc5e9e7459 /src/watcher.zig | |
parent | eec8f5afcf955034572321adcef986c34de7431a (diff) | |
download | bun-jarred/update-zig1.tar.gz bun-jarred/update-zig1.tar.zst bun-jarred/update-zig1.zip |
Fix build issuesjarred/update-zig1
Diffstat (limited to 'src/watcher.zig')
-rw-r--r-- | src/watcher.zig | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/watcher.zig b/src/watcher.zig index ea1ba44ac..50d86781d 100644 --- a/src/watcher.zig +++ b/src/watcher.zig @@ -68,7 +68,7 @@ pub fn NewWatcher(comptime ContextType: type) type { fd: StoredFileDescriptorType, ctx: ContextType, allocator: *std.mem.Allocator, - watchloop_handle: ?u64 = null, + watchloop_handle: ?std.Thread.Id = null, pub fn getHash(filepath: string) u32 { return @truncate(u32, std.hash.Wyhash.hash(0, filepath)); @@ -103,13 +103,12 @@ pub fn NewWatcher(comptime ContextType: type) type { pub fn start(this: *Watcher) !void { _ = try this.getQueue(); std.debug.assert(this.watchloop_handle == null); - - _ = try std.Thread.spawn(Watcher.watchLoop, this); + _ = try std.Thread.spawn(.{}, Watcher.watchLoop, .{this}); } // This must only be called from the watcher thread pub fn watchLoop(this: *Watcher) !void { - this.watchloop_handle = std.Thread.getCurrentThreadId(); + this.watchloop_handle = std.Thread.getCurrentId(); var stdout = std.io.getStdOut(); var stderr = std.io.getStdErr(); var output_source = Output.Source.init(stdout, stderr); |