文檔解釋:Submits a block for asynchronous execution on a dispatch queue and returns immediately.
提一段需要異步操作的代碼塊到一個(gè)分發(fā)隊(duì)列上.立即返回.異步執(zhí)行.
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.
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.
這個(gè)函數(shù)代表 調(diào)用者 執(zhí)行了 Block_copy 和Block_release
討論:
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.
這個(gè)函數(shù)是提交block快代碼到分發(fā)隊(duì)列的基本途徑. 這個(gè)函數(shù)永遠(yuǎn)都是異步調(diào)用.立即返回.
至于是并發(fā)執(zhí)行還是串行執(zhí)行.是由這些塊代碼提交到的隊(duì)列的類型決定的.
單獨(dú)的串行隊(duì)列也是并發(fā)處理這些塊代碼的.