---
title: "yield(_:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/asyncthrowingstream/continuation/yield(_:)"
---

# yield(_:)

Resume the task awaiting the next iteration point by having it return normally from its suspension point with a given element.

## Declaration

```swift
@discardableResult func yield(_ value: sending Element) -> AsyncThrowingStream<Element, Failure>.Continuation.YieldResult
```

## Parameters

- `value`: The value to yield from the continuation.

## Return Value

Return Value A YieldResult that indicates the success or failure of the yield operation.

## Discussion

Discussion If nothing is awaiting the next value, the method attempts to buffer the result’s element. This can be called more than once and returns to the caller immediately without blocking for any awaiting consumption from the iteration.

## See Also

### Producing Elements

- [yield(with:)](swift/asyncthrowingstream/continuation/yield(with:).md)
- [yield()](swift/asyncthrowingstream/continuation/yield().md)
- [AsyncThrowingStream.Continuation.YieldResult](swift/asyncthrowingstream/continuation/yieldresult.md)
