<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PhotogrammetrySession/cancel()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation21PhotogrammetrySessionC6cancelyyF"
  },
  "title" : "cancel()"
}
-->

# cancel()

Requests cancellation of any running requests.

```
func cancel()
```

## Discussion

When cancellation has completed, a `.processingCancelled` message will be output and
`isProcessing` will be `false`.  Calling this method has no effect if `!isProcessing`.

> Note: This call is asynchronous and it may take some time before the pipeline fully stops, resources are
> reclaimed, and the error is actually produced, so callers should monitor `output` for the message before
> making a new session.

---

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)