Task { [weak self] in guard let observeFoo = self?.observe(keyPath: \.foo) else { return } for await foo in observeFoo { guard let self = self else { return } self.printFoo(foo) } }
Task { [child, weak self] in for await foo in child.observe(keyPath: \.foo) { if self == nil { return } child.printFoo(foo) } }
うーーん。。。 (edited)