<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Dispatch",
  "identifier" : "/documentation/Dispatch/DispatchSource/makeUserDataAddSource(queue:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Dispatch"
    ],
    "preciseIdentifier" : "s:So18OS_dispatch_sourceC8DispatchE21makeUserDataAddSource5queueSo0a1_b1_C9_data_add_pSo0a1_b1_J0CSg_tFZ"
  },
  "title" : "makeUserDataAddSource(queue:)"
}
-->

# makeUserDataAddSource(queue:)

Creates a new dispatch source object that you use to coalesce custom app data using an AND operator.

```
class func makeUserDataAddSource(queue: DispatchQueue? = nil) -> any DispatchSourceUserDataAdd
```

## Parameters

`queue`

The dispatch queue to use when executing the installed handlers.

## Return Value

A dispatch source object that conforms to the [`DispatchSourceUserDataAdd`](/documentation/Dispatch/DispatchSourceUserDataAdd) protocol.

## Discussion

After creating the dispatch source, use the methods of the [`DispatchSourceProtocol`](/documentation/Dispatch/DispatchSourceProtocol) protocol to install the event handlers you need. The returned dispatch source is in the inactive state initially. When you are ready to begin processing events, call its [`activate()`](/documentation/Dispatch/DispatchObject/activate()) method.

---

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)