<!--
{
  "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/YieldResult/enqueued(remaining:)",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:Scs12ContinuationV11YieldResultO8enqueuedyADyxq___GSi_tcAFms5ErrorR_r0_lF"
  },
  "title" : "AsyncThrowingStream.Continuation.YieldResult.enqueued(remaining:)"
}
-->

# AsyncThrowingStream.Continuation.YieldResult.enqueued(remaining:)

The stream successfully enqueued the element.

```
case enqueued(remaining: Int)
```

## Discussion

This value represents the successful enqueueing of an element, whether
the stream buffers the element or delivers it immediately to a pending
call to `next()`. The associated value `remaining` is a hint that
indicates the number of remaining slots in the buffer at the time of
the `yield` call.

> Note: From a thread safety perspective, `remaining` is a lower bound
> on the number of remaining slots. This is because a subsequent call
> that uses the `remaining` value could race on the consumption of
> values from the stream.

---

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)