dispatch_suspend/dispatch_resume

当追加大量处理到Dispatch Queue时,在追加处理的过程中,有时希望不执行已追加的处理。
在这种情况下,只要挂起 Dispatch Queue即可。当可以执行时候再恢复。

dispatch_suspend 函数挂起指定的Dispatch Queue.

dispatch_suspend(queue)

dispatch_resume函数恢复指定的Dispatch Queue

dispatch_resume(queue)

你可能感兴趣的:(dispatch_suspend/dispatch_resume)