---
title: run()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nsprintoperation/run()
---

# run()

Runs the print operation on the current thread.

## Declaration

```swift
func run() -> Bool
```

## Return Value

Return Value true if the operation was successful; otherwise, false.

## Discussion

Discussion The operation runs to completion in the current thread, blocking the application. A separate thread is not spawned, even if canSpawnSeparateThread is true. Use runModal(for:delegate:didRun:contextInfo:) to use document-modal sheets and to allow a separate thread to perform the operation.

## See Also

### Running the Print Operation

- [runModal(for:delegate:didRun:contextInfo:)](appkit/nsprintoperation/runmodal(for:delegate:didrun:contextinfo:).md)
- [cleanUp()](appkit/nsprintoperation/cleanup().md)
- [deliverResult()](appkit/nsprintoperation/deliverresult().md)
