aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-05-13 23:57:15 -0400
committerGitHub <noreply@github.com>2022-05-13 23:57:15 -0400
commit802f220739c26081e3018fe7e77e199458ffa8ba (patch)
tree442689a62f99e8f0dc64e67e090e95d0aa2a0fda /lib
parentf32928c50dabde1dee40b7137beef0fe72e89b49 (diff)
parent0cd43b0f8686075cf9bb8b8655ca828bd329d60f (diff)
downloadzig-802f220739c26081e3018fe7e77e199458ffa8ba.tar.gz
zig-802f220739c26081e3018fe7e77e199458ffa8ba.zip
Merge pull request #11647 from ziglang/migrate-runtime-safety-tests
migrate runtime safety tests to the new test harness
Diffstat (limited to 'lib')
-rw-r--r--lib/std/Progress.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/std/Progress.zig b/lib/std/Progress.zig
index 07f9077844..925cefcb74 100644
--- a/lib/std/Progress.zig
+++ b/lib/std/Progress.zig
@@ -93,7 +93,9 @@ pub const Node = struct {
/// This is the same as calling `start` and then `end` on the returned `Node`. Thread-safe.
pub fn completeOne(self: *Node) void {
- self.activate();
+ if (self.parent) |parent| {
+ @atomicStore(?*Node, &parent.recently_updated_child, self, .Release);
+ }
_ = @atomicRmw(usize, &self.unprotected_completed_items, .Add, 1, .Monotonic);
self.context.maybeRefresh();
}
@@ -120,6 +122,7 @@ pub const Node = struct {
pub fn activate(self: *Node) void {
if (self.parent) |parent| {
@atomicStore(?*Node, &parent.recently_updated_child, self, .Release);
+ self.context.maybeRefresh();
}
}