Generic Instance Method

setSpecific(key:value:)

Sets the key/value data for the specified dispatch queue.

Declaration

func setSpecific<T>(key: DispatchSpecificKey<T>, value: T?)

Parameters

key

The key that you use to identify the data.

value

The data you want to associate with the queue.

See Also

Getting and Setting Contextual Data

func getSpecific<T>(key: DispatchSpecificKey<T>) -> T?

Returns the value for the key associated with this dispatch queue.

class func getSpecific<T>(key: DispatchSpecificKey<T>) -> T?

Returns the value for the key associated with the current execution context.

class DispatchSpecificKey

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