Commit 4f7d76f19c
Changed files (2)
lib
std
os
windows
lib/std/os/windows/kernel32.zig
@@ -299,6 +299,6 @@ pub extern "kernel32" fn SleepConditionVariableSRW(
f: ULONG,
) callconv(WINAPI) BOOL;
-pub extern "kernel32" fn TryAcquireSRWLockExclusive(s: *SRWLOCK) callconv(WINAPI) BOOL;
+pub extern "kernel32" fn TryAcquireSRWLockExclusive(s: *SRWLOCK) callconv(WINAPI) BOOLEAN;
pub extern "kernel32" fn AcquireSRWLockExclusive(s: *SRWLOCK) callconv(WINAPI) void;
pub extern "kernel32" fn ReleaseSRWLockExclusive(s: *SRWLOCK) callconv(WINAPI) void;
lib/std/Progress.zig
@@ -103,7 +103,11 @@ pub const Node = struct {
}
parent.completeOne();
} else {
- self.context.done = true;
+ {
+ const held = self.context.update_lock.acquire();
+ defer held.release();
+ self.context.done = true;
+ }
self.context.refresh();
}
}