iOS dispatch_async

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
  • queue
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。
  • block
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.
此函数是将块提交到调度队列的基本机制。 
调用此函数后,始终在提交块后立即返回,并且永远不会等待调用该块。 
目标队列确定是否相对于提交到同一队列的其他块串行或同时调用该块。 独立的串行队列相互同时处理。
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容