---
title: "untilFinished(_:)"
framework: observation
role: symbol
role_heading: Type Method
path: "observation/observations/untilfinished(_:)"
---

# untilFinished(_:)

Constructs an asynchronous sequence for a given closure by tracking changes of @Observable types.

## Declaration

```swift
static func untilFinished(_ emit: @escaping @isolated(any) @Sendable () throws(Failure) -> Observations<Element, Failure>.Iteration) -> Observations<Element, Failure>
```

## Parameters

- `emit`: A closure to generate an element for the sequence.

## Discussion

Discussion The emit closure is responsible for extracting a value out of a single or many @Observable types. This method continues to be invoked until the .finished option is returned or an error is thrown.
