Type Alias

dispatch_function_t

The prototype of functions submitted to dispatch queues.

Declaration

typedef void (*dispatch_function_t)(void *);

Discussion

Functions that take a dispatch_function_t type as a parameter also take a pointer to contextual data that you provide. When your dispatch function is called, the pointer to that contextual data is passed as the parameter to the function. The pointer to the contextual data is passed unmodified to your function and it is your responsibility to ensure that the pointer is valid.

See Also

Executing Tasks Asynchronously

dispatch_async

Submits a block for asynchronous execution on a dispatch queue and returns immediately.

dispatch_async_f

Submits an application-defined function for asynchronous execution on a dispatch queue and returns immediately.

dispatch_after

Enqueues a block for execution at the specified time.

dispatch_after_f

Enqueues an application-defined function for execution at the specified time.

dispatch_block_t

The prototype of blocks submitted to dispatch queues, which take no arguments and have no return value.