<!--
{
  "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/CheckedContinuation/resume(with:)-5n1a5",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:ScC6resume4withys6ResultOyxqd__G_ts5Error_pRs_sAFRd__lF"
  },
  "title" : "resume(with:)"
}
-->

# resume(with:)

Resume the task awaiting the continuation by having it either
return normally or throw an error based on the state of the given
`Result` value.

```
func resume<Er>(with result: sending Result<T, Er>) where E == any Error, Er : Error
```

## Parameters

`result`

A value to either return or throw from the
continuation.

## Discussion

A continuation must be resumed exactly once. If the continuation has
already been resumed through this object, then the attempt to resume
the continuation will trap.

After `resume` enqueues the task, control immediately returns to
the caller. The task continues executing when its executor is
able to reschedule it.

---

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)