<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Dispatch",
  "identifier" : "/documentation/Dispatch/DispatchSpecificKey",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Dispatch"
    ],
    "preciseIdentifier" : "s:8Dispatch0A11SpecificKeyC"
  },
  "title" : "DispatchSpecificKey"
}
-->

# DispatchSpecificKey

A key associated with a specific contextual value on a dispatch queue.

```
final class DispatchSpecificKey<T>
```

## Overview

Access the value of a key using the [`setSpecific(key:value:)`](/documentation/Dispatch/DispatchQueue/setSpecific(key:value:)) and [`getSpecific(key:)`](/documentation/Dispatch/DispatchQueue/getSpecific(key:)-swift.method) methods.

## Topics

### Creating a Key

[`init()`](/documentation/Dispatch/DispatchSpecificKey/init())



---

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)
