| ... | @@ -93,7 +93,9 @@ pub const Node = struct { | ... | @@ -93,7 +93,9 @@ pub const Node = struct { |
| 93 | | 93 | |
| 94 | /// This is the same as calling `start` and then `end` on the returned `Node`. Thread-safe. | 94 | /// This is the same as calling `start` and then `end` on the returned `Node`. Thread-safe. |
| 95 | pub fn completeOne(self: *Node) void { | 95 | pub fn completeOne(self: *Node) void { |
| 96 | self.activate(); | 96 | if (self.parent) |parent| { |
| | 97 | @atomicStore(?*Node, &parent.recently_updated_child, self, .Release); |
| | 98 | } |
| 97 | _ = @atomicRmw(usize, &self.unprotected_completed_items, .Add, 1, .Monotonic); | 99 | _ = @atomicRmw(usize, &self.unprotected_completed_items, .Add, 1, .Monotonic); |
| 98 | self.context.maybeRefresh(); | 100 | self.context.maybeRefresh(); |
| 99 | } | 101 | } |
| ... | @@ -120,6 +122,7 @@ pub const Node = struct { | ... | @@ -120,6 +122,7 @@ pub const Node = struct { |
| 120 | pub fn activate(self: *Node) void { | 122 | pub fn activate(self: *Node) void { |
| 121 | if (self.parent) |parent| { | 123 | if (self.parent) |parent| { |
| 122 | @atomicStore(?*Node, &parent.recently_updated_child, self, .Release); | 124 | @atomicStore(?*Node, &parent.recently_updated_child, self, .Release); |
| | 125 | self.context.maybeRefresh(); |
| 123 | } | 126 | } |
| 124 | } | 127 | } |
| 125 | | 128 | |