<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Dispatch",
  "identifier" : "/documentation/Dispatch/dispatch_function_t",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Dispatch"
    ],
    "preciseIdentifier" : "c:@T@dispatch_function_t"
  },
  "title" : "dispatch_function_t"
}
-->

# dispatch_function_t

The prototype of functions submitted to dispatch queues.

```
typedef void (*)(void *) dispatch_function_t;
```

## Discussion

Functions that take a `dispatch_function_t` type as a parameter also take a pointer to contextual data that you provide. When your dispatch function is called, the pointer to that contextual data is passed as the parameter to the function. The pointer to the contextual data is passed unmodified to your function and it is your responsibility to ensure that the pointer is valid.

---

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)