dispatch_get_specific

Function dispatch_get_specific 

Source
pub unsafe extern "C" fn dispatch_get_specific(
    key: NonNull<c_void>,
) -> *mut c_void
Expand description

Returns the current subsystem-specific context for a key unique to the subsystem.

When called from a block executing on a queue, returns the context for the specified key if it has been set on the queue, otherwise returns the result of dispatch_get_specific() executed on the queue’s target queue or NULL if the current queue is a global concurrent queue.

Parameter key: The key to get the context for, typically a pointer to a static variable specific to the subsystem. Keys are only compared as pointers and never dereferenced. Passing a string constant directly is not recommended.

Returns: The context for the specified key or NULL if no context was found.