Protocol

DispatchSourceUserDataReplace

A dispatch source that replaces any pending data with the new value you provide.

Declaration

protocol DispatchSourceUserDataReplace

Overview

You do not adopt this protocol in your objects. Instead, use the makeUserDataReplaceSource(queue:) method to create an object that adopts this protocol.

To replace the pending data in the dispatch source, call the replace(data:) method.

Topics

Getting the Event Data

func replace(data: UInt)

Replaces the current pending data with the new value you provide.

Relationships

Conforming Types

See Also

Creating a Custom Source

class func makeUserDataAddSource(queue: DispatchQueue?) -> DispatchSourceUserDataAdd

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

class func makeUserDataOrSource(queue: DispatchQueue?) -> DispatchSourceUserDataOr

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

class func makeUserDataReplaceSource(queue: DispatchQueue?) -> DispatchSourceUserDataReplace

Creates a new dispatch source object that you use to track custom app data.

protocol DispatchSourceUserDataAdd

A dispatch source that coalesces data you provide using an AND operation.

protocol DispatchSourceUserDataOr

A dispatch source that coalesces data you provide using an OR operation.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software