Sets the key/value data for the specified dispatch queue.
- iOS 5.0+
- macOS 10.7+
- tvOS 9.0+
- watchOS 2.0+
The queue on which to set the specified key/value data. This parameter must not be
The key you want to use to identify the associated context data. Keys are only compared as pointers and are never dereferenced. Thus, you can use a pointer to a static variable for a specific subsystem or any other value that allows you to identify the value uniquely. Specifying a pointer to a string constant is not recommended.
NULLis not a valid value for the key and attempts to set context data with a
NULLkey are ignored.
The context data to associate with
key. This parameter may be
A destructor function that you can use to release your context data. This parameter may be
NULL, your destructor function is ignored.
Use this method to associate custom context data with a dispatch queue. Blocks executing on the queue can use the
dispatch function to retrieve this data while they are running.