---
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.

## Declaration

```swift
@discardableResult func yield() -> AsyncThrowingStream<Element, Failure>.Continuation.YieldResult where Element == ()
```

## Return Value

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

## Discussion

Discussion Use this method with AsyncThrowingStream instances whose Element type is Void. In this case, the yield() call unblocks the awaiting iteration; there is no value to return. If you call this method repeatedly, each call returns immediately, without blocking for any awaiting consumption from the iteration.

## See Also

### Producing Elements

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