<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/AsyncThrowingStream/Continuation/yield(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:Scs12ContinuationV5yieldyAB11YieldResultOyxq___GxnF"
  },
  "title" : "yield(_:)"
}
-->

# yield(_:)

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

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

## Parameters

`value`

The value to yield from the continuation.

## Return Value

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

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)