<!--
{
  "availability" : [
    "macOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/Process/DidTerminateMessage",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:So6NSTaskC10FoundationE19DidTerminateMessageV"
  },
  "title" : "Process.DidTerminateMessage"
}
-->

# Process.DidTerminateMessage

A message the system sends when a task stops operation.

```
struct DidTerminateMessage
```

## Overview

Observe this message with the identifier [`didTerminate`](/documentation/Foundation/NotificationCenter/MessageIdentifier/didTerminate), or specify its type directly to the `addObserver(of:for:using:)` method.
The [`Subject`](/documentation/Foundation/NotificationCenter/MainActorMessage/Subject) of this message type is [`Process`](/documentation/Foundation/Process).

This message interoperates with the notification [`didTerminateNotification`](/documentation/Foundation/Process/didTerminateNotification).
The system notifies observers of the message when the [`NotificationCenter`](/documentation/Foundation/NotificationCenter) posts the notification.
Similarly, the system notifies observers of the notification when it posts the message.

## Topics

### Creating a message

[`init()`](/documentation/Foundation/Process/DidTerminateMessage/init())

Creates a message about a stopped task.

## Relationships

### Conforms To

[`AsyncMessage`](/documentation/Foundation/NotificationCenter/AsyncMessage)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

---

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)