<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "EndpointSecurity",
  "identifier" : "/documentation/EndpointSecurity/es_thread_state_t/state",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Endpoint Security"
    ],
    "preciseIdentifier" : "c:@SA@es_thread_state_t@FI@state"
  },
  "title" : "state"
}
-->

# state

The machine-specific thread state.

```
var state: es_token_t
```

## Discussion

This equivalent to <doc://com.apple.documentation/documentation/kernel/thread_state_t> in Mach APIs.

> Note:
> The ``doc://com.apple.endpointsecurity/documentation/EndpointSecurity/es_token_t/size`` subfield of the ``doc://com.apple.endpointsecurity/documentation/EndpointSecurity/es_thread_state_t/state`` field is in bytes, not <doc://com.apple.documentation/documentation/kernel/natural_t> units.

---

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)