<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFRunLoopSourceContext/hash",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@SA@CFRunLoopSourceContext@FI@hash"
  },
  "title" : "hash"
}
-->

# hash

A hash calculation callback for your program-defined `info` pointer. Can be `NULL`.

```
var hash: ((UnsafeRawPointer?) -> CFHashCode)!
```

## Parameters

`info`

The `info` member of the [`CFRunLoopSourceContext`](/documentation/CoreFoundation/CFRunLoopSourceContext) or [`CFRunLoopSourceContext1`](/documentation/CoreFoundation/CFRunLoopSourceContext1) structure that was used when creating the run loop source.

## Return Value

A hash code value for `info`.

## Discussion

If a hash callback is not provided for a source, the `info` pointer is used.

---

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)