<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/Process/suspend()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTask(im)suspend"
  },
  "title" : "suspend()"
}
-->

# suspend()

Suspends execution of the receiver task.

```
func suspend() -> Bool
```

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the receiver was successfully suspended, <doc://com.apple.documentation/documentation/Swift/false> otherwise.

## Discussion

Multiple [`suspend()`](/documentation/Foundation/Process/suspend()) messages can be sent, but they must be balanced with an equal number of [`resume()`](/documentation/Foundation/Process/resume()) messages before the task resumes execution.

---

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)