<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "os",
  "identifier" : "/documentation/os/os_workgroup_max_parallel_threads",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "os"
    ],
    "preciseIdentifier" : "c:@F@os_workgroup_max_parallel_threads"
  },
  "title" : "os_workgroup_max_parallel_threads"
}
-->

# os_workgroup_max_parallel_threads

Returns the maximum number of threads that the system recommends you add to the specified workgroup.

```
extern int os_workgroup_max_parallel_threads(os_workgroup_t wg, os_workgroup_mpt_attr_t attr);
```

## Parameters

`wg`

The workgroup to examine.

`attr`

Additional attributes. Specify `NULL` for this parameter.

## Discussion

This function returns the theoretical maximum number of threads for a workgroup, which doesn’t take into account the current system load or whether your app has any other workgroups. The actual number of effective threads may be lower.

---

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)