We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dispatch queue本来就可以挂起和恢复,为什么说要借助dispatch source呢?
The text was updated successfully, but these errors were encountered:
帮忙详细描述下“dispatch queue本来就可以挂起和恢复”,最好能贴一下代码,我看下咱们两个讲的东西是不是有出入。
Sorry, something went wrong.
暂停恢复:使用dispatch_suspend() 和 dispatch_resume() 将队列挂起
取消:通过植入标识对单个任务进行“取消” __block BOOL cancelled = NO; void (^task)(BOOL) = ^() { if (cancelled) { return; } //dosomething }; 也就是文中的通过property(running)来植入“取消”
@ChenYilong 有空的话帮忙看下,哈哈
No branches or pull requests
dispatch queue本来就可以挂起和恢复,为什么说要借助dispatch source呢?
The text was updated successfully, but these errors were encountered: