---
title: cancel()
framework: realitykit
role: symbol
role_heading: Instance Method
path: realitykit/photogrammetrysession/cancel()
---

# cancel()

Requests cancellation of any running requests.

## Declaration

```swift
func cancel()
```

## Discussion

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.

## See Also

### Controlling object creation

- [process(requests:)](realitykit/photogrammetrysession/process(requests:).md)
