dispatch_async
Submits a block for asynchronous execution on a dispatch queue and returns immediately.
在调度队列上提交异步执行块并立即返回.
Declaration
void dispatch_async(dispatch_queue_t queue, dispatch_block_t block);
Parameters
The queue on which to submit the block. The queue is retained by the system until the block has run to completion. This parameter cannot be NULL.
提交块的队列。
系统持有队列直到块运行完成。
此参数不能为NULL。
The block to submit to the target dispatch queue. This function performs Block_copy and Block_release on behalf of callers. This parameter cannot be NULL.
要提交到目标调度队列的块。
此函数代表调用者执行Block_copy和Block_release。
此参数不能为NULL。
Discussion
This function is the fundamental mechanism for submitting blocks to a dispatch queue. Calls to this function always return immediately after the block has been submitted and never wait for the block to be invoked. The target queue determines whether the block is invoked serially or concurrently with respect to other blocks submitted to that same queue. Independent serial queues are processed concurrently with respect to each other.
此函数是将块提交到调度队列的基本机制。
调用此函数后,始终在提交块后立即返回,并且永远不会等待调用该块。
目标队列确定是否相对于提交到同一队列的其他块串行或同时调用该块。 独立的串行队列相互同时处理。