<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPrintOperation/canSpawnSeparateThread",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPrintOperation(py)canSpawnSeparateThread"
  },
  "title" : "canSpawnSeparateThread"
}
-->

# canSpawnSeparateThread

A Boolean value that determines whether the print operation is allowed to spawn a separate printing thread.

```
var canSpawnSeparateThread: Bool { get set }
```

## Parameters

`canSpawnSeparateThread`

<doc://com.apple.documentation/documentation/Swift/true> if the receiver is allowed to spawn a separate thread; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

If `canSpawnSeparateThread` is <doc://com.apple.documentation/documentation/Swift/true>, an `NSThread` object is detached when the print panel is dismissed (or immediately, if the panel is not to be displayed). The new thread performs the print operation, so that control can return to your application. A thread is detached only if the print operation is run using the [`runModal(for:delegate:didRun:contextInfo:)`](/documentation/AppKit/NSPrintOperation/runModal(for:delegate:didRun:contextInfo:)) method. If `canSpawnSeparateThread` is <doc://com.apple.documentation/documentation/Swift/false>, the operation runs on the current thread, blocking the application until the operation completes.

If you send [`canSpawnSeparateThread`](/documentation/AppKit/NSPrintOperation/canSpawnSeparateThread) to an `NSPrintOperation` object with an argument of <doc://com.apple.documentation/documentation/Swift/true>, then the delegate specified in a subsequent invocation of [`runModal(for:delegate:didRun:contextInfo:)`](/documentation/AppKit/NSPrintOperation/runModal(for:delegate:didRun:contextInfo:)) may be messaged in that spawned, non-main thread.

---

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)