Λ࣮ߦ w தؒͷIBOEMFS͋ͬͯෳࡶʜ var handler: ((String) -> Void)? var stream: AsyncStream<String> { AsyncStream { [weak self] continuation in self?.handler = { value in continuation.yield(value) } } } func put(_ value: String){ handler?(value) } for await value in stream { print("streamed value is \(value)") } 10
func put(_ value: String){ continuation.yield(value) } for await value in stream { print("streamed value is \(value)") } 11 IUUQTEFWFMPQFSBQQMFDPNEPDVNFOUBUJPOTXJGUBTZODTUSFBNNBLFTUSFBN PGCV ff FSJOHQPMJDZ